You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But if I change --includes=src/client/store/*.ts to point to a single file, e.g. --includes=src/client/store/registry.ts, it does work. It doesn't seem to matter if I prepend ./ before the path, or use absolute paths.
I am using v2.15.0.
The text was updated successfully, but these errors were encountered:
I'll add this here since I was lucky to find it accidentally after wading through the source: In next.js, when using parameters in routes, your files will have names such as [id].tsx. If you don't quote the argument to --includes, a glob will be resolved by your shell, and the internal glob logic of apollo-codegen will receive [id].tsx, which it seems is a glob instruction itself, and will then not yield the actual file as a result.
I'm finding that all glob patterns fail to find matches, while
includes
values that don't have any patterns are successful.For example, this finds no matches:
node_modules/.bin/apollo codegen:generate --localSchemaFile=graphql-schema.json --target=typescript --includes=src/client/store/*.ts --tagName=gql --addTypename --globalTypesFile=src/client/types/queries.ts queryTypes
But if I change
--includes=src/client/store/*.ts
to point to a single file, e.g.--includes=src/client/store/registry.ts
, it does work. It doesn't seem to matter if I prepend./
before the path, or use absolute paths.I am using v2.15.0.
The text was updated successfully, but these errors were encountered: