Be able to make GraphQLRequest.list
that only include certain attributes
#3882
Labels
GraphQLRequest.list
that only include certain attributes
#3882
Is your feature request related to a problem? Please describe.
I am trying to create a query that lists just the
owner
s of each item in a schema, like this:I was trying to find a way to only include the
owner
usingincludes
, like thisbut from the documentation and type errors, includes is just to include relations and not attributes.
Being able to query by fields is important because some fields may not be readable by all users. The only way to make a list query in this case would be to only query fields that the user does have access to.
Describe the solution you'd like
I'd like something like
GraphQLRequest<MyModel>.list(MyModel.self, attributes: [my_list_of_attributes])
, or more realisticallyattributes: ModelPath -> [FieldPath]
.Describe alternatives you've considered
I am guessing this is technically possible by using a lower level function using
ModelBasedGraphQLDocumentBuilder
. If that is the solution you recommend, could you provide some documentation for it?Is the feature request related to any of the existing Amplify categories?
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: