rmosolgo / graphiql-rails

Mount the GraphiQL query editor in a Rails app
MIT License
447 stars 137 forks source link

Configurable HTTP method #2

Open brianstorti opened 8 years ago

brianstorti commented 8 years ago

In case we want to use an http verb other than POST, it'd be useful to be able to specify it when we mount the engine. Something like:

mount GraphiQL::Rails::Engine, at: "/graphiql", graphql_path: "/graph", method: :get

If you thing this is useful, I can work on the change.

Thanks.

rmosolgo commented 8 years ago

Yes, that'd be great! Can we call it graphql_method? That way it matches graphql_path & it's clear that it's the method for the GraphQL API endpoint, not for the GraphiQL editor.