samsarahq / thunder

⚡️ A Go framework for rapidly building powerful graphql services
https://godoc.org/github.com/samsarahq/thunder
MIT License
1.58k stars 116 forks source link

Example graphiql does not support mutations #103

Open stephen opened 6 years ago

chriskolenko commented 6 years ago

Are you using the GraphIQL to do the mutation? If so.. make sure the live query is stopped if running.. delete all the comments and write the mutation. I got stuck with the first one myself too.

depado commented 6 years ago

The comments break the mutation. Do we know why, though ? Aren't comments supposed to be completely ignored ?

stephen commented 6 years ago

This should be fixed here: https://github.com/samsarahq/thunder/commit/dcb9587cea6b86f3cae102e8fdfb648d383d653c

willhug commented 6 years ago

This is still slightly an issue. The default graphiql query adds this comment at the top:

# Welcome to GraphiQL
#
# GraphiQL is an in-browser IDE for writing, validating, and
# testing GraphQL queries.
#
# Type queries into this side of the screen, and you will
# see intelligent typeaheads aware of the current GraphQL type schema and
# live syntax and validation errors highlighted within the text.
#
# To bring up the auto-complete at any point, just press Ctrl-Space.
#
# Press the run button above, or Cmd-Enter to execute the query, and the result
# will appear in the pane to the right.

Which means by default the query does not start with "mutation".