Closed Panoplos closed 7 years ago
And for clarification, Email
type is resolved as a GraphQLEmail
in another module, so this is not the issue--I am using this in many other places without problems. I also tested changing the IdentityType
to
# Source of Identity (when account created with OAuth2 provider)
type IdentityType {
# Provider type
provider: String!
# Email associated with the identity
email: String!
}
But still no go.
Oh my. OK, this was a really simple problem. I am not sure why, but I was expecting the query to resolve to the complete object by default (I guess because it was a simple type without its own resolver), but obviously changing the Query to
query {
profile {
id
identities {
email,
provider
}
}
}
Fixes this issue... Bleh!!!
Thanks for posting the resolution!
Yeah, to be honest, these kinds of solutions to gotchas are pretty useful when searching for something that may be getting you... haha.
I have a similar issue. I query apps collection like this:
{
appTemplates {
id
}
}
Collection is empty, but returns this:
{
"data": {
"appTemplates": [
{
"id": null
}
]
}
}
is it possible that I get only:
{
"data": {
"appTemplates": []
}
}
:/
I have a schema that I am building with
makeExecutableSchema
which contains a query of the following (shortened for this issue report) form:I have a resolver of the following form:
So, an issue that I am having is that even though this resolver is indeed returning an appropriately formed object, including the array of
IdentityType
's, as can be seen below:The executable schema is resolving
identities
as an array of empty objects: