Is there a way to add on the premade GraphQL APIs that Amplify autogenerates? For example, I have a listTasks query call but I want to add more input fields. Does Amplify provide a way to do this easily? Right now I just copied the query and put it in my React component and modified the query.
Asked
Active
Viewed 35 times
0
-
You can write your own Input Type in your schema.graphql. You should read through https://aws-amplify.github.io/docs/cli-toolchain/graphql – Kevin Regenrek Apr 07 '20 at 15:39
-
@KevinRegenrek Uhh I read it but still not sure. Are you talking about using '@connection' and '@key' to create a custom input? – BKoo Apr 08 '20 at 16:25
-
I'm not sure on which fields you want to query but maybe you can add some keys to your model. https://docs.amplify.aws/cli/graphql-transformer/directives#key – Kevin Regenrek Apr 08 '20 at 17:35