feature request: @MutationField and @QueryField
See original GitHub issueCurrently if I return a class from @Mutation()
and @Query()
and I want to have a field like patch
(
) on the class, this field is exposed on mutations and on queries as well. I’d like to avoid this-hence the new decorator. This could be achieved with a decorator config like
@Field({mutationOnly: true})
or @Field({query: false})
, but IMHO it’s own decorator is more explicit way.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Queries and Mutations - GraphQL
GraphQL queries can traverse related objects and their fields, letting clients fetch lots of related data in one request, instead of making several ......
Read more >Writing mutation resolvers | Full-Stack Quickstart
This resolver takes an email address and returns corresponding user data from our userAPI . We add a token field to the object...
Read more >mutationField - GraphQL Nexus
mutationField exists as a shorthand for this common case: 1export const createUser = mutationField('createUser', {. 2 type: SomeType,. 3 resolve() {.
Read more >GraphQL: Can you mutate the results of a query?
But then we lose the ability to make the query we wanted to make, because findForum is a query field, not a mutation...
Read more >@serverless/aws-app-sync - npm
It supports all AWS AppSync features, while offering sane defaults that makes ... 'dynamodb_ds' type: 'Query' field: 'getMyField' request: ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I didnt understand your question. I’d appreciate if you take your time re-writing it 😃 If it’d be race called ‘who is the fastests to submit issue’, you’d win 😉 )
Could you describe in details your desired schema?