Skip to content

Commit 0d8ed8e

Browse files
authored
Use gql-tada to generate the schema (#596)
1 parent 2ece4f7 commit 0d8ed8e

File tree

4 files changed

+2
-17
lines changed

4 files changed

+2
-17
lines changed

with-graphql/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ This is an example of setting up a graphQL server in an Expo Router [API route](
1414

1515
- [GraphQL Yoga](https://the-guild.dev/graphql/yoga-server) - graphQL server
1616
- [URQL](https://github.com/urql-graphql/urql) - graphQL client ([Apollo Client](https://www.apollographql.com/docs/react) can also be used if preferred)
17-
- [GraphQL Codegen](https://the-guild.dev/graphql/codegen) - for introspection
1817
- [gql.tada](https://gql-tada.0no.co/) - for type generation
1918
- [Expo Router API Route](https://docs.expo.dev/router/reference/api-routes/) - for server-side code
2019
- [EAS Hosting](https://docs.expo.dev/eas/hosting/introduction/) - for API & web deployments

with-graphql/codegen.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

with-graphql/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
},
2020
"devDependencies": {
2121
"@babel/core": "^7.19.3",
22-
"@graphql-codegen/cli": "^5.0.7",
23-
"@graphql-codegen/typescript": "^4.1.6",
2422
"@types/react": "~19.0.10",
2523
"typescript": "~5.8.3"
2624
},
@@ -32,7 +30,7 @@
3230
"android": "expo start --android",
3331
"ios": "expo start --ios",
3432
"web": "expo start --web",
35-
"sync:schema": "graphql-codegen",
33+
"sync:schema": "gql-tada generate schema http://localhost:8081/api/graphql --output ./src/schema.graphql",
3634
"sync:types": "gql-tada generate output"
3735
}
3836
}

with-graphql/src/schema.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
type Joke {
2-
answer: String!
32
id: ID!
43
question: String!
4+
answer: String!
55
}
66

77
type Query {

0 commit comments

Comments
 (0)