Skip to content

Make queriesDir optional via withQueriesDir builder#46

Merged
ruudk merged 1 commit intomainfrom
optional-queries-dir
Apr 18, 2026
Merged

Make queriesDir optional via withQueriesDir builder#46
ruudk merged 1 commit intomainfrom
optional-queries-dir

Conversation

@ruudk
Copy link
Copy Markdown
Owner

@ruudk ruudk commented Apr 18, 2026

Consumers that feed all their operations through GeneratedGraphQLClient (inline or Twig sources) have no .graphql files on disk, so requiring a queriesDir forced them to invent a dummy path.

Drop queriesDir from Config::create() and add a withQueriesDir() builder so it's opt-in like the other dir-scoped settings (inlineProcessing, twigProcessing). Planner and PlanExecutor skip their .graphql finders when queriesDir is null. Breaking change: positional create() callers shift by one, and any caller that needs a queries directory now has to chain withQueriesDir() -- everything in-tree (tests, examples, README) is updated accordingly.

Consumers that feed all their operations through GeneratedGraphQLClient
(inline or Twig sources) have no .graphql files on disk, so requiring a
queriesDir forced them to invent a dummy path.

Drop queriesDir from Config::create() and add a withQueriesDir() builder
so it's opt-in like the other dir-scoped settings (inlineProcessing,
twigProcessing). Planner and PlanExecutor skip their .graphql finders
when queriesDir is null. Breaking change: positional create() callers
shift by one, and any caller that needs a queries directory now has to
chain withQueriesDir() -- everything in-tree (tests, examples, README)
is updated accordingly.
@ruudk ruudk merged commit 67ea93d into main Apr 18, 2026
3 checks passed
@ruudk ruudk deleted the optional-queries-dir branch April 18, 2026 13:24
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.

1 participant