How to specify the fields I want to fetch in a GraphQLQuery

273 views Asked by At

I am trying to use AWS AppSync on an iOS project. I have successfully setup the framework on the project and now I want to start doing queries. To do that I am using the GraphQLQuery objects generated on the API.swift by amplify cli. Thing with those queries is that they ask for all the available fields of the objects. I want specify the properties I want to fetch but I cannot find the way to do it.

So my question is: how can I specify the fields I want to fetch in a GraphQLQuery?

Thanks

1

There are 1 answers

0
Sunny On

Have you checked out this on GitHub: https://github.com/awslabs/aws-mobile-appsync-sdk-ios

Also there are some sample code in this documentation: https://aws-amplify.github.io/docs/ios/api