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

Road towards relay compatibility #7

Closed
hardchor opened this issue Aug 23, 2015 · 1 comment
Closed

Road towards relay compatibility #7

hardchor opened this issue Aug 23, 2015 · 1 comment

Comments

@hardchor
Copy link

Just putting some thoughts down of currently missing features:

Unique Object IDs

Relay wants to be able to (re-)fetch any object in the graph by a unique ID via a root query named node:

node (id: "user123") {
  id
  name
}

Relay methods: fromGlobalId/toGlobalId
See: https://github.com/relayjs/relay-starter-kit/blob/master/data/schema.js#L115

Pagination

On the query side, relay requires first and after arguments (as well as last and before for backwards pagination):

users (first: 10, after: "user123") {
  edges {
    cursor
    node {
      id
      name
    }
  }
  pageInfo {
    hasNextPage
  }
}

Also see: https://facebook.github.io/relay/graphql/connections.htm

Mutation

TBC

I expect graphql-relay-js to help us out with the more intricate details

I hope we can work towards relay compatibility. Please let me know if this is more appropriate for an adapter, e.g. graffiti-mongoose

@hardchor
Copy link
Author

Moved this to RisingStack/graffiti-mongoose#22 as it's purely a schema builder issue.

Feel free to re-open if you want to keep this to a wider audience.

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

1 participant