Skip to content

Instantly share code, notes, and snippets.

@ShiniIn
Created September 7, 2018 08:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ShiniIn/2a2462dcd20218aaaa2da9821f4948a8 to your computer and use it in GitHub Desktop.
Save ShiniIn/2a2462dcd20218aaaa2da9821f4948a8 to your computer and use it in GitHub Desktop.
Suppose I have a query say
mutation{xyz(abc:xyz){identity{uuid}}
When I try to fetch the projection from the datafetching environment by using
Map<String, List<Field>> projectionItems = environment.getSelectionSet().get()
In version 6.0 I get something like
identity=[
Field{
name='identity',
alias='null',
arguments=[
],
directives=[
],
selectionSet=SelectionSet{
selections=[
Field{
name='uuid',
alias='null',
arguments=[
],
directives=[
],
selectionSet=null
}
]
}
}
],
while with same query but with version 9.0 I get something like
identity=[
Field{
name='identity',
alias='null',
arguments=[
],
directives=[
],
selectionSet=SelectionSet{
selections=[
Field{
name='uuid',
alias='null',
arguments=[
],
directives=[
],
selectionSet=null
}
]
}
}
],
identity/uuid=[
Field{
name='uuid',
alias='null',
arguments=[
],
directives=[
],
selectionSet=null
}
],
this identity/uuid object is extra in the 9.0 version. I just want to know what is the significance of the this extra information.
Apart from that is there anyway to surpress this extra information I mean although I can rewrite the projection to JSON array
conversion but still what is significance of this information.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment