contrib icon indicating copy to clipboard operation
contrib copied to clipboard

entgql: experimental global-id support with relay-format (<type>:<id>)

Open a8m opened this issue 2 years ago • 2 comments

An exmaple implementation for supporting the Relay Global ID format exists in https://github.com/graphql/graphql-relay-js/blob/main/src/node/node.ts

image

With errors:

image

a8m avatar Feb 06 '22 10:02 a8m

@theprobugmaker running to the case he needs to encode UUID as Global ID with the Entity Number: <EntityNumber>\n<UUID>.

I think there will be many different formats used, but it is consistent in the project. EntGQL should provide a template that allows to format it.

The user can write customs UnmarshalGQL/MarshalGQL functions to parse Type and ID from/to String.

giautm avatar Feb 14 '22 18:02 giautm

@theprobugmaker running to the case he needs to encode UUID as Global ID with the Entity Number: <EntityNumber>\n<UUID>.

I think there will be many different formats used, but it is consistent in the project. EntGQL should provide a template that allows to format it.

The user can write customs UnmarshalGQL/MarshalGQL functions to parse Type and ID from/to String.

That is right, thank you.

theprobugmaker avatar Feb 14 '22 18:02 theprobugmaker