question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Map UUID keys as GraphQL "ID" type

See original GitHub issue

Currently, Hasura creates a new scalar type called uuid for UUID keys. Because it’s a non-standard type, using it with clients usually means jumping through some hoops to treat the value as a string. But, that’s really all the standard ID type does anyway, as far as I know. I think if this type were remapped in the schema, it’d improve the ergonomics of working with a Hasura-based GraphQL server.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:36
  • Comments:26 (13 by maintainers)

github_iconTop GitHub Comments

14reactions
tirumaraiselvancommented, Aug 21, 2020

@jacdx Yes, this will be picked up very soon.

6reactions
nirvdrumcommented, Jan 13, 2021

@coco98 @tirumaraiselvan Is there anything I can do to help move this along? This became a blocker for a project and I unfortunately haven’t used Hasura much since. I could take a crack at a PR, but I don’t want to sink time into something that’s already being worked on. I also would hate to do it up and find out it doesn’t match internal design goals.

Read more comments on GitHub >

github_iconTop Results From Across the Web

GraphQL and UUID type on Postgres - Hasura
Common practice is to use serial ids as primary keys. Serial ids are auto-incrementing integers, which are usually auto-generated by the ...
Read more >
Should I use UUID on Graphql? - Reddit
I am planning to use Big Int primary keys in a few of Django models. ... Should I use UUID in a DB...
Read more >
GraphQL schema basics
ID (serialized as a String ): A unique identifier that's often used to refetch an object or as the key for a cache....
Read more >
Implementing Unique IDs in GraphQL | by Jonathan Shapiro
In practice, it is usually sufficient if the id field is unique-per-type, because GraphQL client caches concatenate the __typename field with ...
Read more >
GraphQL Types, Resolvers, and Operators - MongoDB
Overview; Scalar Types; Document Types; Field Mapping; BSON Type Mapping ... Atlas App Services automatically generates a GraphQL schema for any collection ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found