Skip to content

Fragments-only set of files are not supported #684

@wasd171

Description

@wasd171

Hi,

When trying to generate types for a set of files that only contains fragments, apollo client:codegen fails with

Error: No document sets found to generate code for.

I suppose that it's related to the following line in apollo/lib/commands/client/codegen.js:

if (!operations.length) {
  throw new Error("No document sets found to generate code for.");
}

As a workaround I can add any query and then codegen works

Metadata

Metadata

Assignees

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