Returning multiple types as custom payload in a custom resolver

Hi!

I’m having trouble returning multiple types as a custom payload in my custom resolver. For instance, I am able to create a custom resolver that returns an array of objects, together with a boolean. However, if I want to return e.g an array of Documents, together with a boolean, I can’t find out how.

I have described the problem further in the following SO post:

Thanks in advance!

Can you paste your input and payload type? I was able to do this with a “Custom” payload type with the following schema:

{
  "bsonType": "object",
  "title": "FindShirts",

  "properties": {
    "shirts": {
      "bsonType": "array",
      "items": {
        "bsonType": "object",
        "title": "ShirtObject",
        "properties": {
          "size": {
            "bsonType": "string"
          }
        }
      }
    },
    "isFoo": {
      "bsonType": "boolean"
    }
  }
}

GraphiQL Schema -

image