dotansimha / dotansimha/graphql-code-generator

ApolloEngineOptions not working

Open
#8,429 1 comment 1 reaction 0 assignees View on GitHub
core
Dominant language
TypeScript
Stars
11.3k
Forks
1.4k
Avg merge
1d 1h
Merged PRs (30d)
23

Description

### Describe the bug

There is a strange issue with `@graphql-codegen/cli` not using the correct version of `@graphql-codegen/plugin-helpers.`

CleanShot 2022-10-03 at 14 51 33@2x

It appears there is a wrong version in the npm package.
CleanShot 2022-10-03 at 14 57 37@2x

It does work when using `npm` see here https://stackblitz.com/edit/github-kbwvke?file=codegen.ts
![CleanShot 2022-10-03 at 14 54 53@2x](https://user-images.githubusercontent.com/1885925/193692958-e4767dad-2d4b-4d3b-9bfd-0f989ae3bd91.png)

### Your Example Website or App

https://codesandbox.io/s/small-snow-bf7rqk?file=/codegen.ts

### Steps to Reproduce the Bug or Issue

Use Yarn to install all the dependencies.
```
"@graphql-codegen/add": "^3.2.1",
"@graphql-codegen/cli": "^2.13.2",
"@graphql-codegen/typescript": "^2.7.3",
"@graphql-codegen/typescript-operations": "^2.5.3",
```

### Expected behavior

To use the correct versions.

### Screenshots or Videos

_No response_

### Platform

"@graphql-codegen/add": "^3.2.1",
"@graphql-codegen/cli": "^2.13.2",
"@graphql-codegen/typescript": "^2.7.3",
"@graphql-codegen/typescript-operations": "^2.5.3",
"graphql": "^16.2.0",
"typescript": "^4.8.4"

### Codegen Config File
```
import type { CodegenConfig } from '@graphql-codegen/cli';

const config: CodegenConfig = {
overwrite: true,
schema: [
{
'apollo-engine': {
engine: {
apiKey: 'service:testing',
},
graph: 'my-graph',
variant: 'current',
},
},
],
documents: 'document.graphql',
generates: {
'types.ts': {
plugins: [
'typescript',
'typescript-operations',
'typescript-react-apollo',
],
},
},
};

export default config;
```

### Additional context

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.