Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using GraphQL to wrap the REST API #14

Open
GuilhermeHideki opened this issue Sep 5, 2018 · 1 comment
Open

Using GraphQL to wrap the REST API #14

GuilhermeHideki opened this issue Sep 5, 2018 · 1 comment

Comments

@GuilhermeHideki
Copy link
Member

GuilhermeHideki commented Sep 5, 2018

I was thinking, what if we create a GraphQL project to:

  • Wrap the multiple requests to the aura API,
    • use types to replace the include params ?include=field1,field2
  • Maybe reuse the schema for projects not using this spec (Create a adapter?)

For an example, I would mention the https://github.com/exogen/graphbrainz project

Relevant XKCD but I think it would be useful

@sampsyo
Copy link
Member

sampsyo commented Sep 6, 2018

Hi! I've sort of been thinking about this myself. The big question, in my view, is whether AURA itself should be a GraphQL API instead of a REST API.

TBH, I don't have a lot of experience with GraphQL, but it might answer some of the trickier questions that came up in the AURA design. You mentioned multiple requests and includes, which are certainly the big ones. GraphQL also seems to have a concept called "subscriptions" that could help with getting incremental updates to cached data.

I'd be interested to hear thoughts from people with more experience on this front! It might be interesting to try designing the GraphQL equivalent and to see how it feels compared to the JSON-API version we have now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants