dotansimha / dotansimha/graphql-code-generator-community

Fetcher endpoint is not inside doubles when using typescript-react-query

Open
#161 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
137
Forks
195
Avg merge
6h 20m
Merged PRs (30d)
16

Description

**Describe the bug**

When generating the code, the endpoint is not inside double quotes, it gives an error as it's not recognized as a string

![image](https://user-images.githubusercontent.com/15630886/145656123-61cbedff-b724-4d4a-90c3-2239e19efde5.png)

**To Reproduce**
Steps to reproduce the behavior:

Just generate the code with the configuration below

Sandbox: https://codesandbox.io/s/goofy-sound-42uge?file=/codegen.yml

I removed some of the codegen.yml content, but the error stays

1. My GraphQL schema:

```graphql
# Put your schema here
```

2. My GraphQL operations:

```graphql
# Put your operations here
```

3. My `codegen.yml` config file:

```yml
overwrite: true
schema: "http://localhost:3000/api/graphql"
documents: "apollo/**/*.graphql"
generates:
apollo/generated.ts:
plugins:
- "typescript"
- "typescript-operations"
- "typescript-react-query"
config:
fetcher:
endpoint: "/api/graphql"
./graphql.schema.json:
plugins:
- "introspection"
mirage/schema.graphql:
plugins:
- schema-ast
config:
commentDescriptions: true
```

**Expected behavior**

**Environment:**

- OS:
- `@graphql-codegen/...`:
- NodeJS:

**Additional context**

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.