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

Deprecate createQuery and replace with createFunction #1908

Merged
merged 5 commits into from
Apr 19, 2023

Conversation

bharatkashyap
Copy link
Member

Deprecating createQuery in favour of createFunction, and favouring function instead of query in all related contexts to better follow the new nomenclature

@bharatkashyap bharatkashyap added the core Infrastructure work going on behind the scenes label Apr 18, 2023
@bharatkashyap bharatkashyap requested a review from Janpot April 18, 2023 00:56
export const TOOLPAD_FUNCTION = Symbol.for('ToolpadFunction');
/**
* @deprecated
* TOOLPAD_QUERY is deprecated. Use TOOLPAD_FUNCTION instead.
Copy link
Member

@Janpot Janpot Apr 18, 2023

Choose a reason for hiding this comment

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

TOOLPAD_QUERY is not public API, you can just rename

/**
* @deprecated
* createQuery is deprecated. Use createFunction instead.
*/
export default function createQuery<C extends CreateQueryConfig<CreateQueryConfigParameters<C>>>(
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible to avoid duplication this way?

import createFunction from './createFuction'

/**
 * @deprecated
 * createQuery is deprecated. Use createFunction instead.
 */
const createQuery = createFunction
export default createQuery

@bharatkashyap bharatkashyap merged commit 933f85e into mui:master Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants