Skip to content

feat(solid-query): Solid Query Adapter For TanStack Query#4195

Closed
ardeora wants to merge 251 commits intoTanStack:betafrom
ardeora:solid-query
Closed

feat(solid-query): Solid Query Adapter For TanStack Query#4195
ardeora wants to merge 251 commits intoTanStack:betafrom
ardeora:solid-query

Conversation

@ardeora
Copy link
Contributor

@ardeora ardeora commented Sep 21, 2022

This pull request aims to add the TanStack Query adapter for Solid JS. This pull request will add the following key primitives to the package.

  • createQuery
  • createQueries
  • createInfiniteQueries
  • createMutation
  • useIsFetching
  • useIsMutating
  • useQueryClient
  • QueryClient
  • QueryClientProvider

The adapter docs have been updated as well as examples have been added. Please let me know how I can help get this massive PR accepted in the beta branch

Acknowledgments

The work on solid-query could not have been possible without

Aryan Deora and others added 30 commits September 8, 2022 11:32
add test support and query client provider tests
- disable rule of hooks in solid-query
conditionally apply babel react preset to packages other than
solid-query. apply solid-babel-preset to solid query.
make tsconfig look like react query tsconifg

- add incremental compilation
- output types in ./build/lib
- allow project references
now we should be able to successfully run npm test on every commit.
Keep comments and better organisation of types by functions
lukesmurray and others added 23 commits September 19, 2022 10:12
* solid-query: (104 commits)
  Throw to errorBoundary when options set correctly
  Making options reactive + added batching tasks
  Fix infiniteQueries Formatting
  add createQueries tests
  run prettier tests
  Prettier fix for infiniteQueries
  Added createQueries
  format with prettier
  format with prettier
  almost all create mutation tests passing
  all infinite query tests passing
  most infinite query tests passing
  Small Types Fix for CreateInfiniteQuery
  Prettifying and removing logs
  Completed tests and reviewed PR
  replace react in comment with solid
  replace instances of test with it
  ignore some errors in tests
  add comment about reactive notifyOnChange props
  more merge fixes
  ...
add simple and graphql examples
- mark solid/store as external dep
- mark @tanstack/solid-query as side effect free for tree shaking
add exports from solid preset
- make type come first
- make browser valid
- make default come last
- fix path to solid export
- include solid files in files
Thanks to all these amazing folks who helped in making solid-query a reality

Co-Authored-By: Luke Murray <34020210+lukesmurray@users.noreply.github.com>
Co-Authored-By: Jen Kaplan <25395806+jennyckaplan@users.noreply.github.com>
Co-Authored-By: Oscar Beaumont <oscar@otbeaumont.me>
@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 4a6586a:

Sandbox Source
@tanstack/query-example-react-basic Configuration
@tanstack/query-example-react-basic-typescript Configuration

Copy link
Collaborator

@TkDodo TkDodo left a comment

Choose a reason for hiding this comment

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

wow, this is amazing 🚀

I don't know enough about solid to comment on specifics, but the react-query parts are really awesome ❤️

@@ -0,0 +1,1737 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think there should only be one package-lock.json file at the root of the monorepo. The examples should be listed as a workspace here:

query/package.json

Lines 30 to 56 in ea80700

"workspaces": [
"./packages/query-core",
"./packages/query-async-storage-persister",
"./packages/query-broadcast-client-experimental",
"./packages/query-sync-storage-persister",
"./packages/react-query",
"./packages/react-query-devtools",
"./packages/react-query-persist-client",
"./examples/react/auto-refetching",
"./examples/react/basic",
"./examples/react/basic-graphql-request",
"./examples/react/basic-typescript",
"./examples/react/default-query-function",
"./examples/react/load-more-infinite-scroll",
"./examples/react/nextjs",
"./examples/react/offline",
"./examples/react/optimistic-updates-typescript",
"./examples/react/pagination",
"./examples/react/playground",
"./examples/react/prefetching",
"./examples/react/react-native",
"./examples/react/react-router",
"./examples/react/rick-morty",
"./examples/react/simple",
"./examples/react/star-wars",
"./examples/react/suspense"
],

Copy link
Contributor

Choose a reason for hiding this comment

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

resolved in #4211.

@lukesmurray
Copy link
Contributor

thanks @TkDodo. we can remove the lock file.

couple questions.

do we need to do anything to get our examples listed on the website with codesandbox integration?

do we need all tests passing to get this merged and published on npm? currently there are two failing tests.

lastly wanted to confirm any of the changes we made outside the solid-query and examples folders, for instance, changes to rollup.config.ts are ok before we merge.

@TkDodo
Copy link
Collaborator

TkDodo commented Sep 23, 2022

lastly wanted to confirm any of the changes we made outside the solid-query and examples folders, for instance, changes to rollup.config.ts are ok before we merge.

I don't know much about the rollup config, I think @DamianOsipiuk does :)

@lukesmurray
Copy link
Contributor

This PR can probably be closed and we can use #4211 instead where I rebased the changes onto main.

@TkDodo TkDodo closed this Sep 23, 2022
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