You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried implementing GraphQL schemas using your sample code.
You use the resolve method on a GraphQLObjectType with the following parameters: root, {id}, source, fieldASTs.
Your fieldASTs object seems to be a list containing the selectionSet that you reduce to map them to the wanted projections. Anyway when using the current version of graphql-js the object that gets returend to me is an array (atm it includes only one element) that then includes a list with the wanted selectionSet.
Any idea if this has changed and your code uses and older version or if i'm missing something? I don't get why it's an array with a single element. My current solution which works but seem's just not right:
I tried implementing GraphQL schemas using your sample code.
You use the resolve method on a
GraphQLObjectType
with the following parameters:root, {id}, source, fieldASTs
.Your
fieldASTs
object seems to be a list containing theselectionSet
that you reduce to map them to the wanted projections. Anyway when using the current version of graphql-js the object that gets returend to me is an array (atm it includes only one element) that then includes a list with the wantedselectionSet
.Any idea if this has changed and your code uses and older version or if i'm missing something? I don't get why it's an array with a single element. My current solution which works but seem's just not right:
return syntaxTree.fieldASTs[0].selectionSet.selections.reduce((projections, selection) => {})
The text was updated successfully, but these errors were encountered: