Skip to content
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

FilterableField option to exclude from ObjectType #1048

Closed
mwoelk opened this issue Apr 7, 2021 · 0 comments · Fixed by #1055
Closed

FilterableField option to exclude from ObjectType #1048

mwoelk opened this issue Apr 7, 2021 · 0 comments · Fixed by #1055
Labels
enhancement New feature or request

Comments

@mwoelk
Copy link
Contributor

mwoelk commented Apr 7, 2021

Is your feature request related to a problem? Please describe.
It would be great if there's an filterOnly option in the arguments of @FilterableField so that this field would only appear as filter but not as field in the generated ObjectType.

Why is this good to have? E.g. when working with federation we might want to filter using the id of a federated relation.
But we only want to have the relation itself in the resulting object type.

Have you read the Contributing Guidelines?

yes

Describe the solution you'd like

@FilterableField({filterOnly: true})
federatedRelationId: string;

Describe alternatives you've considered
Just leaving the id field in which unnecessarily bloats up the API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant