amplify-js
amplify-js copied to clipboard
Add SelectionSets on Mutations
Is this related to a new or existing framework?
React Native
Is this related to a new or existing API?
GraphQL API
Is this related to another service?
DynamoDB
Describe the feature you'd like to request
I would like the ability to define selectionSets for mutations as well. Currently the mutation responses return a lot of unneeded data and I'm also getting some TS errors when comparing them to other data structures because I can't define them.
Describe the solution you'd like
const response = await client.models.Friendship.create({
status: FriendStatus.PENDING,
senderId: userStore.currentUser?.id!,
receiverId: friend.id,
},
{
selectionSet: friendshipSelectionSet
})
Describe alternatives you've considered
N/A
Additional context
No response
Is this something that you'd be interested in working on?
- [ ] 👋 I may be able to implement this feature request
- [ ] ⚠️ This feature might incur a breaking change