graphql-inspector
graphql-inspector copied to clipboard
feat(action): add support for headers
🚨 IMPORTANT: Please do not create a Pull Request without creating an issue first.
Any change needs to be discussed before proceeding. Failure to do so may result in the rejection of the pull request.
Description
This PR adds the option to pass headers and a method when fetching the "before" schema in the Github Action. The motivation is the same as https://github.com/kamilkisiela/graphql-inspector/discussions/2055, basically I need auth headers to fetch the schema but it is not supported in any way atm.
If needed I can also add the headers to the "after" schema.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
Screenshots/Sandbox (if appropriate/relevant):
Adding links to sandbox or providing screenshots can help us understand more about this PR and take action on it as appropriate
How Has This Been Tested?
I ran the test suite included but I couldn't get $ pnpm run action
to work so trying this to see what CI does.
Test Environment:
- OS:
-
@graphql-inspector/...
: - NodeJS:
Checklist:
- [x] I have followed the CONTRIBUTING doc and the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...
⚠️ No Changeset found
Latest commit: c317eba57ebb845cac8d79c2dc452e777f6e4cec
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Updating the current @zeit/ncc to the latest "@vercel/ncc": "0.36.1",
helps but I'm still getting this weird TypeError: Cannot read properties of undefined (reading 'path')
error