Bug: using an undefined fragment from within a fragment causes a 500


#1

Reproduce:

{
  viewer {
    ...frag1
  }
}

fragment frag1 on User {
  ...frag2
}

Yields:

{
  "data": null,
  "errors": [
    {
      "message": "Something went wrong while executing your query. This is most likely a GitHub bug. Please include \"02E573CD:3E49:41CB780:580631D1\" when reporting this issue."
    }
  ]
}

Note that frag2 is used but not defined. If this occurs in the main query, not in a fragment, a useful error message is returned instead.


#2

I’ve confirmed that this is a bug with the gem, rather than with any GitHub specific code, and have opened an issue: https://github.com/rmosolgo/graphql-ruby/issues/329


#3

@josharian I completely forgot to follow up with you, but this should now be fixed. Thanks for the report!


#4

#5

#6

This topic was automatically closed after 2 days. New replies are no longer allowed.