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: Drop publicGraphQLClient in favour of $public client #2300

Merged

Conversation

DafyddLlyr
Copy link
Contributor

@DafyddLlyr DafyddLlyr commented Oct 12, 2023

What does this PR do?

  • Replaces publicGraphQLClient in favour of $public
  • No functionality change, just a tidy up and simplification
  • Small permission change with getClientForTemplate() now conditionally using the api role instead of the admin role

@github-actions
Copy link

github-actions bot commented Oct 12, 2023

Removed vultr server and associated DNS entries

})),
};
});
jest
Copy link
Contributor Author

@DafyddLlyr DafyddLlyr Oct 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using spies like this actually feels much nicer than mocks as it keeps the function type safe - it forces us to pass in valid return types for functions we're spying on.

I'll do a pass of these at some point very soon and tidy up the remaining jest.mock("@opensystemslab/planx-core") calls.

@DafyddLlyr DafyddLlyr requested a review from a team October 13, 2023 07:33
@DafyddLlyr DafyddLlyr force-pushed the dp/remove-publicGraphQLClient branch from d496cbb to 2fc0a3e Compare October 13, 2023 07:40
@DafyddLlyr DafyddLlyr marked this pull request as ready for review October 13, 2023 07:51
@DafyddLlyr DafyddLlyr merged commit 4745235 into dp/use-api-client-for-useHasuraAuth Oct 13, 2023
10 checks passed
@DafyddLlyr DafyddLlyr deleted the dp/remove-publicGraphQLClient branch October 13, 2023 13:00
DafyddLlyr added a commit that referenced this pull request Oct 13, 2023
* feat: Create client for 'api' role

* chore: Replace  with

* fix: Tidy up

* feat: Drop `publicGraphQLClient` in favour of `$public` client (#2300)
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.

2 participants