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

Feature: Extend GraphQL Client Package Types #1927

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

admirsaheta
Copy link
Contributor

WHY are these changes introduced?

Fixes #1813
These changes are intended to enhance type safety and provide more clarity in the codebase by using readonly where applicable. Additionally, an extended GQLExtensions type has been introduced to support more detailed cost-related metadata for GraphQL queries.

WHAT is this pull request doing?

This pull request introduces the use of readonly in several places to prevent mutation of properties that should remain unchanged.
Specifically, it includes:

  • readonly applied to properties in interfaces such as ClientOptions, ClientConfig, RequestOptions, etc.
  • An extension to the GQLExtensions type to provide more detailed cost-related information for GraphQL queries, including the requested and actual query costs, throttle status, and associated metadata.

Type of change

  • Patch: Bug (non-breaking change which fixes an issue)
  • Minor: New feature (non-breaking change which adds functionality)
  • Major: Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have used pnpm changeset to create a draft changelog entry (do NOT update the CHANGELOG.md files manually)
  • I have added/updated tests for this change
  • I have documented new APIs/updated the documentation for modified APIs (for public APIs)

@admirsaheta admirsaheta requested a review from a team as a code owner January 7, 2025 10:36
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.

Suggestion: Enhance Type Definitions for GQLExtensions and FetchResponseBody
1 participant