You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Query validation that runs at build time will fail if the backend instance provided uses https but the certificate is self-signed or not trusted. Given query validation is a development build time activity where this setup would be common, we should allow insecure backends (similarly to how we ignore SSL errors for proxied requests to Magento).
To Reproduce
Steps to reproduce the behavior:
Setup insecure Magento backend
Configure this backend in .env
yarn build
See error
...
$ yarn run download-schema && graphql validate-magento-pwa-queries --project venia
$ graphql get-schema --project venia
⚠ request to https://magento-pwa.localhost/graphql failed, reason: certificate has expired
Validating GraphQL queries in venia project...
✖ An error occurred:
Could not find a schema at lastCachedGraphQLSchema.json.
...
Expected behavior
Query validation runs successfully and build completes
Possible solutions
Add insecure: true to packages/venia-concept/.graphqlconfig so the command graphql get-schema --project venia works with insecure Magento backends.
Please let us know what packages this bug is in regards to:
venia-concept
pwa-buildpack
peregrine
pwa-devdocs
upward-js
upward-spec
The text was updated successfully, but these errors were encountered:
@LucasCalazans - I just pushed up PR #1313 with a working fix; looks like it was a CLI argument, not something you could configure in .graphqlconfig. As you've found, you can also just use an insecure backend.
Describe the bug
Query validation that runs at build time will fail if the backend instance provided uses https but the certificate is self-signed or not trusted. Given query validation is a development build time activity where this setup would be common, we should allow insecure backends (similarly to how we ignore SSL errors for proxied requests to Magento).
To Reproduce
Steps to reproduce the behavior:
.env
yarn build
Expected behavior
Query validation runs successfully and build completes
Possible solutions
Add
insecure: true
topackages/venia-concept/.graphqlconfig
so the commandgraphql get-schema --project venia
works with insecure Magento backends.Please let us know what packages this bug is in regards to:
venia-concept
pwa-buildpack
peregrine
pwa-devdocs
upward-js
upward-spec
The text was updated successfully, but these errors were encountered: