Skip to content

fix: enable skipToken for better typescript handling for disabled useQueries#3075

Merged
LMayTNG merged 2 commits intomainfrom
fix/add-skip-token
Mar 25, 2026
Merged

fix: enable skipToken for better typescript handling for disabled useQueries#3075
LMayTNG merged 2 commits intomainfrom
fix/add-skip-token

Conversation

@LMayTNG
Copy link
Contributor

@LMayTNG LMayTNG commented Mar 23, 2026

No description provided.

@LMayTNG LMayTNG force-pushed the fix/add-skip-token branch from e3e6fc2 to 164e74f Compare March 25, 2026 09:41
Base automatically changed from feat/move-frequent-licenses-to-be to main March 25, 2026 12:33
Copy link
Contributor

Choose a reason for hiding this comment

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

would it make sense to add the database initialize to the skiptoken above or to add the skiptoken to the enabled here?

Copy link
Contributor

Choose a reason for hiding this comment

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

could make the logic cleaner, since the whole

if (options !== undefined && 'enabled' in options) {
return Boolean(
  typeof options.enabled === 'function'
    ? options.enabled(query)
    : options.enabled,
);

Ist quite bad

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea, that's much cleaner

attributionUuid: packageInfo.originalAttributionId as string,
},
{ enabled: !!packageInfo.originalAttributionId },
packageInfo.originalAttributionId !== undefined
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: in all other places you replace !!packageInfo.originalAttributionId with packageInfo.originalAttributionId ? ... : skipToken, instead of an undefined check

@LMayTNG LMayTNG force-pushed the fix/add-skip-token branch from 164e74f to d4c5398 Compare March 25, 2026 15:23
@LMayTNG LMayTNG enabled auto-merge March 25, 2026 15:23
@LMayTNG LMayTNG merged commit 2c07394 into main Mar 25, 2026
7 checks passed
@LMayTNG LMayTNG deleted the fix/add-skip-token branch March 25, 2026 15:32
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