Individual single node accessor root fields should be disableable
- 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
Assessment
This issue has not been assessed yet.