News for hackers. Stuff that matters.
Re:Use links not keys to represent relationships in APIs by tuukkah on Sunday May 12, 2019 @02:14AM (#19890469)
thing { id } comes from the Relay specification and it can well be a URI:

Node Interface

The server must provide an interface called Node. That interface must include exactly one field, called id that returns a non‐null ID.

This id should be a globally unique identifier for this object, and given just this id, the server should be able to refetch the object.

https://facebook.github.io/relay/graphql/objectidentificatio...

Re:Use links not keys to represent relationships in APIs by sbr464 on Sunday May 12, 2019 @02:27AM (#19890500)
I agree, and don't mind, We've just decided to add in both fields thing_id & thing, for parsing convenience.
Re:Use links not keys to represent relationships in APIs by tuukkah on Sunday May 12, 2019 @02:57AM (#19890574)
I guess most schema designs wouldn't duplicate each field just for that convenience, as it doubles the number of fields in documentation, autocompletes etc. as well.