graphql-client: Disable Authentication Option

Created on 22 April 2024, 7 months ago
Updated 6 May 2024, 7 months ago

Problem/Motivation

When creating an instance of the class, specify if authentication should be used. Auth will be used by default if an authentication option is provided. (Note: This has already been implemented)

On a per method basis, it should be possible to override this in order to specify if authentication should or should not be used.

Steps to reproduce

* Create an instance of the GraphqlClient with an authentication method configured.
* All subsequent fetch requests will use this authentication method with no way to override and make an anonymous request.

Proposed resolution

* The GraphqlClient GetOptions interface should accept a new disableAuthentication option.
* If disableAuthentication is true, the fetch request should not use authentication headers

Remaining tasks

* Implement changes.
* Update docs.
* Add test coverage.

API changes

* JsonApiClient GetOptions interface will accept a new disableAuthentication option

✨ Feature request
Status

Active

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States brianperry

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024