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

fix: respect the allParamsOptional config option in React query initi… #1583

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lnkarma
Copy link
Contributor

@lnkarma lnkarma commented Aug 17, 2024

Status

READY

Description

Fixes #1564

Related PRs

List related PRs against other branches:

branch PR
feature/react-query-initial-data #1505

Todos

  • Tests
  • Documentation
  • Changelog Entry (unreleased)

Steps to Test or Reproduce

Follow the steps mentioned #1564

@melloware melloware added this to the 7.0.2 milestone Aug 17, 2024
@melloware melloware added the tanstack-query TanStack Query related issue label Aug 17, 2024
@melloware
Copy link
Collaborator

I will let @anymaniax review but I feel like there is a more clever way to do this. It's so similar to the other branch of code?

@@ -26,6 +26,7 @@ export const getProps = ({
const bodyProp = {
name: body.implementation,
definition: `${body.implementation}${body.isOptional ? '?' : ''}: ${body.definition}`,
definedDefinition: `${body.implementation}: ${body.isOptional ? 'undefined' : ''} | ${body.definition}`,
Copy link
Collaborator

@anymaniax anymaniax Aug 22, 2024

Choose a reason for hiding this comment

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

would be better not modifying the core for that. You could do the same think directly in the react query client no?

@melloware melloware removed this from the 7.1.0 milestone Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tanstack-query TanStack Query related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

React query initialData overloads don't respect the allParamsOptional config option
3 participants