You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why do you keep repeating that in every example? The source should be there instead, the actual query. I don't use express and never will, and you're hiding how it actually works behind thie createHandler function.
The text was updated successfully, but these errors were encountered:
benjie
transferred this issue from graphql/graphql.github.io
Jan 18, 2025
This is good feedback, the main reason for this repetition is to make examples copy and past-able without having to keep all prior examples as context. There are good reasons for using express, it's general purpose and as mentioned before, graphql-http builds on top of all these major frameworks.
We are purposefully not picking apollo-server or graphql-yoga to make these examples, instead we use something that is destined to be spec-compliant with GraphQL Over HTTP as we maintain this ourselves.
The main complexity with removing the handler code is that we'd have to implement our own server in a lot of these pages which isn't really our intention as that would need us to implement every spec detail of GraphQL Over HTTP. We could remove the HTTP requirement but that would make a lot of these demo's less useful as they wouldn't expose the data-transfer part of GraphQL.
The main thing we want to show is how to create types, the exemplification of setting up the server is more so that people can actually play with it, having considered all of that I gravitate towards leaving the operational aspect of the examples in place personally.
This part of your documentation is kind of worthless:
Why do you keep repeating that in every example? The source should be there instead, the actual query. I don't use express and never will, and you're hiding how it actually works behind thie createHandler function.
The text was updated successfully, but these errors were encountered: