marmelab / json-graphql-server

Get a full fake GraphQL API with zero coding in less than 30 seconds.
MIT License
1.93k stars 169 forks source link

[feature request] customize foreign key properties (*_id) #150

Open orenelbaum opened 1 year ago

orenelbaum commented 1 year ago

There's already this issue https://github.com/marmelab/json-graphql-server/issues/25 for customizing the id field. I want to be able to customize the *_id fields as well.

Is your feature request related to a problem? Please describe. The problem is I can't get the schema I want, I want to have a Post type with author_id that points to a User type, but this is only one example, it's a common use case.

Describe the solution you'd like Being able to customize the *_id field and somehow provide metadata about which type the field points to.