Skip to content

Conversation

@DominicGBauer
Copy link
Contributor

Description

Allow compilable queries as hook arguments so that ORM's e.g. kysely queries can be used as arguments in place of string SQL statements

Work Done

  • Allowed useQuery to accept compilable query as an argument
  • Added testing

How to Test

  • Try use a compilable query in a useQuery hook


// The test returns unhandled errors when run with all the others.
// TODO: Fix the test so that there are no unhandled errors (this may be a vitest or @testing-library/react issue)
it.only('should show an error if parsing the query results in an error', async () => {
Copy link
Contributor

@Chriztiaan Chriztiaan May 2, 2024

Choose a reason for hiding this comment

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

.skip?

@DominicGBauer DominicGBauer merged commit c94be6a into main May 2, 2024
@DominicGBauer DominicGBauer deleted the feat/add-kysely-to-hook branch May 2, 2024 09:59
rkistner referenced this pull request in Galaxies-dev/react-native-local-first May 4, 2024
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.

4 participants