-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support additional fields #59
Comments
graphql-codegen-typescript-fabbrica excludes properties other than field (
So, if you pass a field such as Therefore, implementing alias-derived fields requires a change in the implementation of transient fields. |
This feature supports any additional fields, not just fields for aliases. I think the feature should be renamed from "alias fields" to "additional fields". |
blocked by: #73
Problem
Alias is a feature that allows you to change the result of a field to any name you want.
This can be used to generate a response with a field that does not exist in
Author
type.However, graphql-codegen-typescript-fabbrica cannot generate alias-derived fields. This makes it difficult to build responses for queries that use aliases.
Solution
Allow
defaultFields
to accept alias-derived fields. The interface is designed with reference to Quramy/prisma-fabbrica#252.Drawbacks
In the current implementation of graphql-codegen-typescript-fabbrica, fields not included in type are treated as transient fields. transient fields are not included in the built data.
Therefore, to implement this proposal, we have to change the interface of transient fields.
The text was updated successfully, but these errors were encountered: