question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Resolvers in src/graphql not updating correctly on amplify push

See original GitHub issue

** Which Category is your question related to? ** API, GraphQL

** What AWS Services are you utilizing? ** amplify cli, S3, DynamoDB, GraphQL, Cognito

** Provide additional details e.g. code snippets ** I’m currently running version 1.1.7 of the amplify CLI.

I made a change to the graphql.schema and did amplify push but the files in src/graphql are not being updated to reflect that I removed a @model declaration. Is there a way to force rebuild those? Doing amplify api gql-compile does not do it. To be clear, mutations.js, queries.js, subscriptions.js and schema.json are all unchanged. My expectation is that they would be updated automatically whenever a change in graphql.schema is pushed.

I also just added a new model to my schema.grapql file, did amplify push, all of the services were updated with the new model but the files in src/graphql were not updated to reflect this change.

Is there a way to force this to happen?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
poppybankcommented, Mar 29, 2019

Sorry, I missed that request. Yes, when I deleted .graphqlconfig.yml and did amplify codegen add it did start generating the code again on the next push. Thanks!

2reactions
yuthcommented, Mar 11, 2019

@poppybank is this .graphqlconfig.yml after you did amplify add codegen --apiId. If thats the case could you delete .graphqlconfig.yml the file and then run amplify codegen add and see the codegen happens when you push after that

Read more comments on GitHub >

github_iconTop Results From Across the Web

API (GraphQL) - Overwrite & customize resolvers - Amplify Docs
GraphQL resolvers connect the fields in a type's schema to a data source. Resolvers are the mechanism by which requests are fulfilled.
Read more >
Running 'amplify mock' resets the changes to queries, mutations
When running push or codegen it updates the auto-generated files as expected but leaves my custom files alone. Here's an example. In src/graphql...
Read more >
Creating a useful GraphQL server using AWS Amplify
Amplify provides a very easy way to do this, simply by running the command amplify push . This updates the backend of your...
Read more >
The Amplify Series, Part 4: Developing and deploying a cloud ...
We need to run amplify push to push our changes to AWS and have CloudFormation create the resources for us: Evertsons-MBP:theamplifyapp ...
Read more >
Build and Deploy a Serverless GraphQL React App Using ...
No worries, after signing up you have access to the AWS Free Tier which does ... amplify push✓ Successfully pulled backend environment dev...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found