-
Notifications
You must be signed in to change notification settings - Fork 115
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
get-schema doesn't update the generated schema when called in post-deploy hook of prisma.yml #354
Comments
get-schema
doesn't update the generated schema when called in post-deploy hook of prisma.yml
I am also suffering from this issue! |
As a workaround, you can generate
|
@carstenbaumhoegger could you verify that this is not the same issue as prisma/prisma#3491? This would help a lot with navigation of the problem. 🙂 |
I encounter same issue |
@nikolasburk thanks for posting the workaround! @maticzav I'm working on macOS and can't reproduce this issue |
@maticzav OSX, same issue
projects:
app:
schemaPath: src/schema.graphql
extensions:
endpoints:
default: http://localhost:4000
db:
schemaPath: src/generated/prisma.graphql
extensions:
prisma: database/prisma.yml
prepare-binding:
output: src/generated/prisma.ts
generator: prisma-ts
secret: ${env:PRISMA_SECRET}
endpoint: ${env:PRISMA_ENDPOINT}
datamodel:
- types.graphql
- enums.graphql
hooks:
post-deploy:
- graphql get-schema --project db
- graphql prepare
{
"name": "demo-app",
"scripts": {
"start": "dotenv -- nodemon -e ts,graphql -x ts-node src/index.ts",
"dev": "npm-run-all --parallel start playground",
"debug": "dotenv -- nodemon -e ts,graphql -x ts-node --inspect src/index.ts",
"playground": "graphql playground",
"build": "rimraf dist && tsc",
"prisma": "dotenv -- prisma",
"db:seed": "dotenv -- ts-node src/seed.ts",
"db:up": "docker-compose up -d",
"db:down": "docker-compose down",
"db:stop": "docker-compose stop"
},
"dependencies": {
"@types/cors": "^2.8.4",
"@types/jsonwebtoken": "^8.3.0",
"@types/lodash": "^4.14.118",
"@types/moment": "^2.13.0",
"@types/node": "^10.12.11",
"apollo-cache-inmemory": "^1.3.11",
"apollo-cache-persist": "^0.1.1",
"bcryptjs": "^2.4.3",
"cors": "^2.8.5",
"debug": "^4.1.0",
"dotenv-cli": "^1.4.0",
"express-jwt": "^5.3.1",
"graphql-middleware-forward-binding": "^1.3.2",
"graphql-shield": "^4.1.0",
"graphql-yoga": "^1.16.7",
"jsonwebtoken": "^8.3.0",
"jwks-rsa": "^1.3.0",
"moment": "^2.22.2",
"nodemon": "^1.18.6",
"prisma-binding": "^2.2.8",
"ts-lint": "^4.5.1",
"ts-node": "^7.0.1",
"typescript": "^3.1.6"
},
"devDependencies": {
"@types/graphql": "^14.0.3",
"graphql-cli": "^2.17.0",
"npm-run-all": "^4.1.5",
"prisma": "^1.21.1"
}
} |
Further reading...
├─┬ [email protected]
│ ├─┬ [email protected]
npm ERR! peer dep missing: graphql@^0.13.1, required by [email protected]
npm ERR! peer dep missing: graphql@^0.13.2, required by [email protected]
npm ERR! peer dep missing: graphql@^0.10.5 || ^0.11.3 || ^0.12.0 || ^0.13.0, required by [email protected]
npm ERR! extraneous: [email protected] /xxx/node_modules/node-pre-gyp
npm ERR! extraneous: [email protected] /xxx/dev/veed-backend/node_modules/apollo-codegen/node_modules/graphql-config/node_modules/graphql-import/node_modules/graphql
npm ERR! peer dep missing: graphql@^0.11.0 || ^0.12.0 || ^0.13.0, required by [email protected]
npm ERR! extraneous: [email protected] /xxx/dev/veed-backend/node_modules/graphql-static-binding/node_modules/graphql
npm ERR! extraneous: [email protected] /xxx/dev/veed-backend/node_modules/graphql-config/node_modules/graphql
npm ERR! peer dep missing: graphql@^0.12.0 || ^0.13.0, required by @kbrandwijk/[email protected]
npm ERR! extraneous: [email protected] /xxx/dev/veed-backend/node_modules/@kbrandwijk/swagger-to-graphql/node_modules/graphql
npm ERR! peer dep missing: graphql@^0.13.1, required by [email protected]
npm ERR! peer dep missing: graphql@^0.13.2, required by [email protected]
npm ERR! peer dep missing: graphql@^0.10.5 || ^0.11.3 || ^0.12.0 || ^0.13.0, required by [email protected]
npm ERR! peer dep missing: graphql@^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0, required by [email protected]
npm ERR! peer dep missing: [email protected] - 0.13.x, required by [email protected]
npm ERR! peer dep missing: [email protected] - 0.13.x, required by [email protected]
npm ERR! peer dep missing: [email protected] - 0.13.x, required by [email protected]
npm ERR! peer dep missing: [email protected] - 0.13.x, required by [email protected]
npm ERR! peer dep missing: [email protected] - 0.13.x, required by [email protected]
npm ERR! peer dep missing: graphql@^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0, required by [email protected]
npm ERR! peer dep missing: graphql@^0.13.1, required by [email protected]
npm ERR! peer dep missing: graphql@^0.13.2, required by [email protected]
npm ERR! peer dep missing: graphql@^0.10.5 || ^0.11.3 || ^0.12.0 || ^0.13.0, required by [email protected]
npm ERR! peer dep missing: graphql@^0.13.1, required by [email protected]
npm ERR! peer dep missing: graphql@^0.13.2, required by [email protected]
npm ERR! peer dep missing: graphql@^0.10.5 || ^0.11.3 || ^0.12.0 || ^0.13.0, required by [email protected] |
@maticzav @carstenbaumhoegger
{
...
"resolutions": {
"graphql": "^0.13.0",
"**/graphql": "^0.13.0"
}
}
secret: ${env:PRISMA_SECRET}
endpoint: ${env:PRISMA_ENDPOINT}
datamodel:
- types.graphql
- enums.graphql
hooks:
post-deploy:
- graphql get-schema --project db
- graphql codegen
projects:
app:
schemaPath: src/schema.graphql
extensions:
endpoints:
default: http://localhost:4000
db:
schemaPath: src/generated/prisma.graphql
extensions:
prisma: database/prisma.yml
codegen:
- generator: prisma-binding
language: typescript
output:
binding: src/generated/prisma.ts |
We've just released a new alpha version channel for GraphQL CLI - We've changed the Could you please test it out with your Prisma setup and let us know if the new structure solves your issue? Checkout new instructions in the migration guide and let us know your feedback during that alpha period! Feel free to contact us by opening a new issue or joining our Discord channel; |
I've posted the wrong Discord link, this is the correct one: https://discord.gg/xud7bH9 |
Describe the bug
As I updated to
[email protected]
today I noticed a strange behaviour ofgraphql get-schema
.I haven't touched my
prisma.yml
for months but suddenly today after some changes indatamodel.graphql
, the generated files remained unchanged after runninggraphql get-schema
inprisma.yml
post-deploy
.When I run
graphql get-schema
from my command line it notices the changes and generates the new schema files as expected.To Reproduce
Steps to reproduce the behavior:
datamodel.graphql
src/generated
remain untouchedExpected behavior
The schema files get updated accordingly to the changes in the datamodel.
Versions (please complete the following information):
macOS Mojave
graphql-cli
:2.17.0
prisma
:1.20.0
node
:10.10.0
The text was updated successfully, but these errors were encountered: