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

feat: sdk: add setHeaders for setting global headers and make sure all client calls have a headers arg #2697

Merged
merged 8 commits into from May 13, 2024

Conversation

onehassan
Copy link
Contributor

resolves #2696

@onehassan onehassan self-assigned this May 9, 2024
@onehassan onehassan requested a review from nunopato as a code owner May 9, 2024 15:25
Copy link

changeset-bot bot commented May 9, 2024

🦋 Changeset detected

Latest commit: bb08ea1

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

This PR includes changesets to release 22 packages
Name Type
@nhost/hasura-storage-js Minor
@nhost/graphql-js Minor
@nhost/nhost-js Minor
@nhost/react Patch
@nhost/vue Patch
@nhost/apollo Major
@nhost-examples/cli Patch
@nhost-examples/multi-tenant-one-to-many Patch
@nhost-examples/node-storage Patch
@nhost-examples/vue-apollo Patch
@nhost-examples/nextjs-server-components Patch
@nhost/nextjs Patch
@nhost/react-apollo Patch
@nhost/react-urql Patch
@nhost-examples/codegen-react-apollo Patch
@nhost-examples/codegen-react-query Patch
@nhost-examples/codegen-react-urql Patch
@nhost-examples/nextjs Patch
@nhost-examples/react-apollo Patch
@nhost-examples/react-gqty Patch
@nhost-examples/vue-quickstart Patch
@nhost/dashboard 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

Copy link

vercel bot commented May 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
dashboard-staging ✅ Ready (Inspect) Visit Preview May 10, 2024 4:28pm
example-nextjs-server-components ✅ Ready (Inspect) Visit Preview May 10, 2024 4:28pm
example-react-apollo ✅ Ready (Inspect) Visit Preview May 10, 2024 4:28pm
example-sveltekit ✅ Ready (Inspect) Visit Preview May 10, 2024 4:28pm
example-vue-apollo ✅ Ready (Inspect) Visit Preview May 10, 2024 4:28pm
1 Ignored Deployment
Name Status Preview Updated (UTC)
dashboard ⬜️ Ignored (Inspect) Visit Preview May 10, 2024 4:28pm

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 73.83178% with 28 lines in your changes are missing coverage. Please review.

Project coverage is 85.92%. Comparing base (68e0622) to head (bb08ea1).

Files Patch % Lines
packages/nhost-js/src/clients/functions/index.ts 68.96% 18 Missing ⚠️
packages/nhost-js/src/clients/nhost.ts 79.59% 10 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2697      +/-   ##
==========================================
- Coverage   86.06%   85.92%   -0.14%     
==========================================
  Files          86       86              
  Lines        9484     9587     +103     
  Branches      486      485       -1     
==========================================
+ Hits         8162     8238      +76     
- Misses       1322     1349      +27     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@onehassan onehassan merged commit 304065a into main May 13, 2024
16 checks passed
@onehassan onehassan deleted the feat/sdk/set-headers branch May 13, 2024 12:38
@xmlking
Copy link

xmlking commented May 14, 2024

@onehassan why do we need to pass argument for unsetRole() function ? e.g., nhost.unsetRole('admin')
Is it just removing x-hasura-role header?

@dbarrosop
Copy link
Contributor

@xmlking copy&paste mistake, will fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sdk SDK package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add "headers" option to missing methods in the js sdk
5 participants