Skip to content

loadQuery's data is sometimes null #84

@dvnrsn

Description

@dvnrsn
const initial = await context.sanity.loadQuery<Page>(
  PAGE_QUERY,
);

console.log(initial)
// { data: null }

It's not obvious to me why this value is null in the remix loader. Sometimes even in the same moment it is switching. I know it works because the UI looks good but I noticed this because I started seeing server errors.

CleanShot 2024-06-04 at 12 32 21

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