pg_graphql icon indicating copy to clipboard operation
pg_graphql copied to clipboard

Comment directive to use `id` in relay style `node` interface

Open olirice opened this issue 3 years ago • 0 comments

Add a comment directive, relay_style_ids to remap any <table.id> fields to collectionId (or similar) and use id as the ID! to interop with relay with default relay config.

Note, you can currently use relay by adding nodeInterfaceIdField to your relay config

{
  "src": "./src",
  ...
  "schemaConfig": {
    "nodeInterfaceIdField": "nodeId"
  }
}

olirice avatar Nov 23 '22 15:11 olirice