Open jgnieuwhof opened 4 years ago
Thanks for the connection plugin! I'm on a team that had made our own, one small change and we'll be able to deprecate ours, and use yours 😅.
The relay connection plugin currently hardcodes the cursor fields to be of the string type:
Edge.cursor
PageInfo.startCursor
PageInfo.endCursor
We'd like to be able to configure the cursor fields to be of a non-string, custom scalar type.
Ah interesting - I suppose this is allowed in the spec https://relay.dev/graphql/connections.htm#sec-Cursor
Should be easy to add... cursorType?
cursorType
That works, thank you!
Thanks for the connection plugin! I'm on a team that had made our own, one small change and we'll be able to deprecate ours, and use yours 😅.
The relay connection plugin currently hardcodes the cursor fields to be of the string type:
Edge.cursor
: https://github.com/graphql-nexus/schema/blob/develop/src/plugins/connectionPlugin.ts#L438PageInfo.startCursor
: https://github.com/graphql-nexus/schema/blob/develop/src/plugins/connectionPlugin.ts#L478PageInfo.endCursor
: https://github.com/graphql-nexus/schema/blob/develop/src/plugins/connectionPlugin.ts#L482We'd like to be able to configure the cursor fields to be of a non-string, custom scalar type.