graphql-codegen Questions
4
I'm using Pothos to build a graphql schema and graphql-codegen to generate types based on this schema. The server runs via graphql-yoga and nextjs and the actual query works fine when run via the g...
Swartz asked 12/4, 2023 at 21:49
9
Solved
In my package.json file I've got script entry that runs graphql-codegen but it complains that the --config argument is invalid:
$> yarn gen
yarn run v1.21.1
$ graphql-codegen --config codegen.y...
Iciness asked 14/2, 2020 at 1:22
5
Trying to follow the rather sparse tutorial on the official page doesn't get me far.
I'm essentially trying to add a certain header based on the params of an api call, but am clueless how to config...
Paviour asked 28/7, 2021 at 13:54
1
I'm using the typescript-operations from graphql-codegen library. But I'm coming from the Apollo deprecated codegen and was loving how they exported types.
for a query like this
query MyData {
vie...
Spillage asked 31/8, 2022 at 15:45
3
Solved
I am using graphql with generated types and struggling with how to convert them to the type I need to pass it to my data service calls.
@graphql-codegen has given me an args type of
export type Que...
Banting asked 7/4, 2021 at 15:47
5
Solved
I am using the @graphql-codegen/cli tool to generate typescript types out of my graphql server.
Here is my codegen.yml content:
overwrite: true
schema: "http://localhost:3001/graphql"
documents: "...
Waylonwayman asked 17/11, 2019 at 19:33
3
Solved
I am looking for a way to make the developer workflow more efficient while GraphQL.
Currently, using graphql-code-generator to generate types from my GraphQL server on the frontend.
This is great, ...
Inhumation asked 16/8, 2020 at 11:25
2
I've built a GraphQL API using strawberry and strawberry-django-plus that is hosted on http://localhost:8000/graphql using Django. I am able to successfully interact with the API using GraphiQL on ...
Bernardo asked 2/7, 2022 at 22:17
1
Solved
I load my GraphQL schema like:
const schema = loadSchemaSync('./src/graphql/server/schema/*.gql', {
loaders: [new GraphQLFileLoader()],
})
This works fine locally, however, when deploying to verc...
Actin asked 23/9, 2021 at 22:4
5
I'm using graphQL code generator on an angular app and I'm trying to load my schema from a local nestjs app.
Here is the codegen.yml file:
schema: http://localhost:3000/graphql
documents: ./src/a...
Response asked 5/3, 2020 at 12:58
3
I would like to override a the jsonb type for a speficic field in a graphql schema produced by Hasura and run through graphql-code-generator.
I have a customList field of type jsonb. Ths is used t...
Flair asked 29/11, 2019 at 15:8
2
Solved
The codegen.ts config below results in duplicating the RegisterDocument entries.
codegen.ts:
const config: CodegenConfig = {
overwrite: true,
schema: "http://localhost:4000/graphql",
d...
Society asked 19/10, 2022 at 19:4
1
Solved
I have a this graphql query:
import { graphql } from '../__generated__/gql';
// typeof IndexPageQuery is unknown
const IndexPageQuery = graphql(`
query IndexPageQuery {
user {
...UserInputFragm...
Dung asked 14/10, 2022 at 10:47
2
I use the following convention to let resolvers return partial data, and allow other resolvers complete the missing fields:
type UserExtra {
name: String!
}
type User {
id: ID!
email: String!
...
Priam asked 16/10, 2020 at 11:46
0
I'm using GraphQl Codegen with the typescript and typescript-operations plugins, but the file generated contains a tone of Maybe and Scalars making the file look very messy.
export type Formation =...
Barye asked 20/5, 2022 at 15:48
1
Solved
UPDATE: Minimum example code reproduction
I have auto-generated code (Graphql-Codegen) that generates the following types. I've condensed it for simplicity.
export type AccessControlList = {
__typ...
Plainspoken asked 5/5, 2022 at 13:35
1
I'm trying to use this boilerplate project.
My codegen.yml file defines the schema as:
schema: http://localhost:5555/graphql
When I try to generate the graphql code-gen, I get an error that says:
...
Kiakiah asked 3/5, 2022 at 0:41
1
Solved
A custom scalar type named Date which is an ISO 8601 string is defined in the backend.
In the frontend "GraphQL Code Generator" (https://www.graphql-code-generator.com/) is used to genera...
Jardena asked 1/10, 2021 at 15:30
2
Solved
I'm using GraphQL Codegen to generate TypeScript types from my GraphQL schema. Here is my query, I've used a fragment so that it has it's only type which is easy to export:
query reservationsPage($...
Snelling asked 20/11, 2020 at 16:33
1
Solved
I have generated a simple GraphQL API on AWS AppSync (using CLI) from this model:
type WalletProperty @model {
id: ID!
title: String!
}
This generated a CreateWalletProperty, UpdateWalletPropert...
Pee asked 2/9, 2020 at 9:23
2
I have fully typesafe auto-generated code by the awesome graphql-codgen/vue.
I use it in my project by building a little wrapper so my Users don't have to do common config tasks every call. Like e...
Eolanda asked 16/5, 2020 at 9:38
1
© 2022 - 2024 — McMap. All rights reserved.