graphile / graphile/crystal

Individual single node accessor root fields should be disableable

Open
#1,839 1 comment 0 reactions 0 assignees View on GitHub
✨ feature
Dominant language
TypeScript
Stars
12.9k
Forks
625
Avg merge
5h 23m
Merged PRs (30d)
24

Description

Currently every type that as a global object identifier automatically gets a root `type(id: ID!): Type` field (or equivalent) via the `graphile-build` `NodeAccessorPlugin`. For a polymorphic relational database table (e.g. `relational_items` in the test suite); it would make sense to have a `relationalItem(id: ID!): RelationalItem` field and not have `relationalChecklist`, `relationalChecklistItem`, ... fields. Some users also want to disable the node accessor for certain tables.

Technically we already have `node(id: ID!)` so all the individual accessors can be turned off... but super broad polymorphism like that is a bit expensive at planning time in Grafast right now.

Ideally this would be configurable via behaviors, but since it comes from `graphile-build` that's not an option right now.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.