-
Notifications
You must be signed in to change notification settings - Fork 108
Alternative to graphql_ppx? #140
Comments
Yep, you can definitely use reason-apollo without graphql_ppx, though I agree it's not super obvious. Basically, if you're using graphql_ppx, it creates a module that conforms to the I wrote about why/how I'm doing Apollo in Reason without graphql_ppx. Essentially I define Reason types that align to all of my GraphQL types, and then a I prefer this approach because I can reuse types everywhere, and because of the limitations you mentioned with graphql_ppx regarding interfaces and inline fragments. I've actually got all of my queries and mutations defined in .graphql files, which I also prefer because I can lint them! Hope that's helpful. I'm unsure about the best way to document any of this in this repo because it's a pretty significant difference in the way you work with it. |
Soon (I hope), |
@kgoggin That is an amazing article....wow. Would you consider putting up a non graphql_ppx version of the swapi example with concepts in your article? I think that might give the community an appropriate place to watch/discuss the current state of things with issues/pull as things change. Plus, as a new user, being able to fire up a fully functional example and see all the setup details (linting, pattern matching, etc) is invaluable and helps get others on the bandwagon. |
@baransu Thanks, I hadn't seen that! I actually checked the graphql_ppx repo before creating this issue and saw that there's already an issue regarding interface support: mhallin/graphql_ppx#47. I didn't want to create a redundant issue, so I filed this one. |
@swac graphql_ppx starting from version 0.2.8 have interfaces support. |
Issue Labels
It seems all of the existing examples and documentation suggest using
graphql_ppx
to parse queries and responses.graphql_ppx
currently has significant limitations, such as not supporting interfaces and inline fragments, however. Is there any alternative to usinggraphql_ppx
with Reason Apollo? If so, it would be great to have an example documented. If not, is there any workaround for querying a GraphQL API that uses interfaces?The text was updated successfully, but these errors were encountered: