Skip to content
This repository was archived by the owner on Mar 26, 2024. It is now read-only.

Found 0 candidate files #296

@philefstat

Description

@philefstat

I've both the main version and v1 alpha, but no matter what I try, I get

ℹ [default] Found 0 candidate files
⚠ [default] Found 0 queries from 0 files.

Even with a simple groq query in a typescript file:

 groq`*[_type == "siteSettings"][0]{
    title,
    description
  }`

I've also tried wrapping it in codegen as follows:

import { codegen, groq } from '@sanity-codegen/client'

const query = codegen(
  // the query key:
  'SiteSettings',
  // the query (must be wrapped in groq``):
  groq`*[_type == "siteSettings"][0]{
    title,
    description
  }`
)

but I get the same result. How does sanity-codegen find queries / how can I point it in the direction of my queries so that the types are generated for them?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions