-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I generate exportable graphql input types using amplify codegen
?
#44
Comments
codegen does not generate input types, but its needed for offline support. We will have to update the codegen to generate input types to make it easier to support offline support |
@yuth could the input types generated by AppSync be downloaded with something like |
@jkeys-ecg-nmsu the compiled schema should already be available to you inside I have added this issue to our backlog to generate input types. I will try to get to this as soon as this gets prioritized. |
aws codegen
?amplify codegen
?
It seams that you can pass the entire schema into the "inputType":
then:
And Im using the graphql-tag/loader: https:/apollographql/graphql-tag It seams not to work with the schema.json file... I'm not sure if this is a good idea or not? But the goal must be to define everything once in schema.graphql and reuse everything from there on. |
Set input type manually as follows. It works.
|
Hi @timrchavez .The input types are generated for |
** Which Category is your question related to? **
codegen
** What AWS Services are you utilizing? **
appsync, dynamodb
** Provide additional details e.g. code snippets **
I'm trying to follow the documentation here https://aws-amplify.github.io/docs/js/api#aws-appsync-sdk and there is an example for using
buildMutation
given:Specifically,
import { createTodo, CreateTodoInput } from './graphql/mutations';
When I run
amplify codegen
, the generatedsrc/graphql/mutations.js
does not includeinput
types (e.g. CreateTodoInput in the case of the example given). How do I generate these, so I can usebuildMutation
in a similar manner?Just noticed I used
aws
instead ofamplify
everywhere. My bad :)aws
mindshare is strongThe text was updated successfully, but these errors were encountered: