Skip to content

Solid Query docs: Code examples with useSuspenseQuery that don't exist #9654

@reivilibre

Description

@reivilibre

Describe the bug

On some pages such as https://tanstack.com/query/latest/docs/framework/solid/guides/request-waterfalls, there are code examples showing useSuspenseQuery which does not appear to be a function exposed by the Solid Query library.

I also am not sure about the technical accuracy of some claims:

Another example of serial queries is when you use Solid Query with Suspense:

function App () {
  // The following queries will execute in serial, causing separate roundtrips to the server:
  const usersQuery = useSuspenseQuery({ queryKey: ['users'], queryFn: fetchUsers })
  const teamsQuery = useSuspenseQuery({ queryKey: ['teams'], queryFn: fetchTeams })
  const projectsQuery = useSuspenseQuery({ queryKey: ['projects'], queryFn: fetchProjects })

  // Note that since the queries above suspend rendering, no data
  // gets rendered until all of the queries finished
  ...
}

This appears to be a React-specific consideration; on the other hand I'm not sure that this would perform serial execution in Solid (but I am a newbie and I am not sure, this is just from what I have gleamed)

Your minimal, reproducible example

https://tanstack.com/query/latest/docs/framework/solid/guides/request-waterfalls

Steps to reproduce

Visit docs page https://tanstack.com/query/latest/docs/framework/solid/guides/request-waterfalls

Expected behavior

Code example to reference real functions

How often does this bug happen?

None

Screenshots or Videos

No response

Platform

Tanstack Query adapter

None

TanStack Query version

5.87.4

TypeScript version

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions