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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(http-executor): don't force application/json content type #5825

Merged
merged 9 commits into from
Jan 9, 2024

Conversation

felamaslen
Copy link
Contributor

@felamaslen felamaslen commented Jan 9, 2024

馃毃 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

  • Fixes http-executor so as not to force the application/json content-type header
  • This is necessary as you might want to specify a custom content-type header, such as application/vnd.api+json

Related #5824

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • 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?

  • Added a unit test on the http executor builder, asserting that a custom content type is passed through to the fetch function
  • The test fails on previous commit, passes with the changes

Test Environment:

  • OS:
  • @graphql-tools/...:
  • NodeJS:

Checklist:

  • I have followed the
    CONTRIBUTING doc and the
    style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests and linter rules 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...

Copy link

changeset-bot bot commented Jan 9, 2024

馃 Changeset detected

Latest commit: ea363c0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@graphql-tools/executor-http Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ardatan
Copy link
Owner

ardatan commented Jan 9, 2024

Thanks for the PR!
I left some comments then we can merge and release!

@felamaslen
Copy link
Contributor Author

Thanks for the PR!
I left some comments then we can merge and release!

Thanks for review, have addressed 馃憤

@ardatan ardatan merged commit 12b578e into ardatan:master Jan 9, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants