Skip to content
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

Amplify push with Api change overrides schema.json path #1818

Closed
amirmishani opened this issue Jul 13, 2019 · 3 comments · Fixed by #1864
Closed

Amplify push with Api change overrides schema.json path #1818

amirmishani opened this issue Jul 13, 2019 · 3 comments · Fixed by #1864
Assignees
Labels
feature-request Request a new feature

Comments

@amirmishani
Copy link

Describe the bug
I have a mono repo setup where my /amplify folder sits in the root of the project and my /graphql folder is located in a shared package like so packages/core/src/graphql/schema.json. When I'm pushing changes in the API the schemaPath setting in my .graphqlconfig.yaml file is always overwritten. The actual mutation and query file paths are respected and only the schemaPath is changed to a default schemaPath: src/graphql/schema.json

To Reproduce
Steps to reproduce the behavior:

  1. Move your /graphql directory somewhere other than /src
  2. Refelect the change in your .graphqlconfig.yaml
  3. Change something in your GraphQL schema
  4. use amplify push and confirm updates to GraphQL API and generating GraphQL statements.
  5. Observe GraphQL statements correctly being placed in new location but a new /graphql/schema.json created in the root of your project AND in your .graphqlconfig.yaml the schemaPath changed back to schemaPath: src/graphql/schema.json

Expected behavior
I expect the schemaPath setting to be respected and not overwritten.

@amirmishani amirmishani changed the title Amplify push Api change overrides schema.json path Amplify push with Api change overrides schema.json path Jul 13, 2019
@UnleashedMind UnleashedMind added code-gen pending-triage Issue is pending triage labels Jul 15, 2019
@kaustavghosh06 kaustavghosh06 added enhancement and removed pending-triage Issue is pending triage labels Jul 18, 2019
@kaustavghosh06
Copy link
Contributor

We don't expose the schemaPath custom configuration and is hardcoded currently. I'm adding this as an enahncement so that this schemaPath is configurable and not overwritten.

yuth added a commit to yuth/amplify-cli that referenced this issue Jul 18, 2019
Codegen use to reset the location of downloaded introspection shcema to the default location when a
push was done. Updated code to prevent chaning of schema location

fix aws-amplify#1818
kaustavghosh06 pushed a commit that referenced this issue Jul 18, 2019
* fix(amplify-codegen): prevent schema location change on push

Codegen use to reset the location of downloaded introspection shcema to the default location when a
push was done. Updated code to prevent chaning of schema location

fix #1818

* tests and lint
@amirmishani
Copy link
Author

Awesome thanks!

@github-actions
Copy link

This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.

Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 27, 2021
@josefaidt josefaidt added feature-request Request a new feature and removed enhancement labels Sep 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants