-
Notifications
You must be signed in to change notification settings - Fork 52
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 #22
Comments
@hekike @gergelyke Are you guys still developing this? Feels like the project is already dead before it even got off the ground... |
hi @hardchor, thanks for raising them! in the past weeks sadly we did not have the time that this project would deserve - could you help us out and send a PR with these? |
I'm still at the crossroads which route to take:
Before I invest any significant amount of time, how likely are you to continue this project, i.e. are you going to be using it in production apps or is it all still a bit in the air? Also, mutation is a biggie - whilst not being a completely blocker for this ticket, not having mutations would certainly leave a big gap in any Relay integration. https://github.com/RisingStack/graffiti-mongoose/milestones/support%20mutation%20queries |
We definitely want to use it in production applications - with that said, I would go for finishing up one graffiti adapter implementation first, this one, so we will have a reference when working with others, like bookshelf. What do you think? |
Totally agreed. Could have a bit of a catch up on Skype if you fancy. |
in which timezone are you in? let's find a time which can work. cc-ing in @hekike |
GMT. Added you both to https://gitter.im/hardchor/graffiti |
Given that the cursors are specified as opaque, I don't see why cursors and globally unique IDs need be the same. The global id could take the format of EDIT: globalIdField used here works nicely, wrapping the same information https://github.com/RisingStack/graffiti-mongoose/pull/27/files#diff-55c36325e001f1671db3cf8a5b686a2aR59 |
@parkan They are opaque, but as you already noted, encoded as a globally unique ID (just a simple base64 encoding) |
We have added the |
I guess we can close this, right? |
I think we're still some way off full relay compatibility:
|
The |
N.B.: Moved this from RisingStack/graffiti#7
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
: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
andafter
arguments (as well aslast
andbefore
for backwards pagination):edges
: describes the collection (https://facebook.github.io/relay/graphql/connections.htm#sec-Edge-Types)cursor
: would be the unique ID discusses abovenode
: the box-standard field selectorpageInfo
: an object with meta-data about the current page (https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo)hasNextPage
hasPreviousPage
: for backwards paginationAlso see: https://facebook.github.io/relay/graphql/connections.htm
Mutation
TBC
Fragment support
Connections
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
The text was updated successfully, but these errors were encountered: