graphql-elixir / plug_graphql

Plug (Phoenix) integration for GraphQL Elixir
Other
126 stars 7 forks source link

Append `graphql` to the fetcher URL in template #33

Open asiandrummer opened 7 years ago

asiandrummer commented 7 years ago

This PR changed the fetcher URL to be relative - due to my carelessness this broke GraphiQL example code. I'd like to propose the change that will let you keep the relativeness of the fetcher URL and still have a specific endpoint URL for graphql execution-related requests.

asiandrummer commented 7 years ago

GraphiQL#184 will reflect GraphiQL side of changes.

aweiker commented 7 years ago

This will break places where the endpoint does not end with graphql. This used to be hard coded but it was changed in d8fb53dcc9f54ddd0633bfa14a7029c2883c5d0f

asiandrummer commented 7 years ago

It definitely will, and also I understand this change will only act as reflection of the fix I'll make to GraphiQL example code, and is probably not too meaningful if you'd like to keep your graphiql template as-is. The main reason I put up this PR is to communicate that GraphiQL will have this change. I think using GraphiQL without this change (if I understood your code correctly) will still work as expected. Please let me know if that's what you would like to do and I can close this PR (or please feel free to close this if you'd like).

aweiker commented 7 years ago

Your interpretation is correct. We use the example in GraphiQL as a template that we update when we take on new updates. We have a strong desire to minimize the amount of code we have to update, so tracking these updates is desirable.