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
1. Familiar developer experience with `fresh` projects.
@@ -10,7 +15,9 @@ GraphQL development for Deno Fresh.
10
15
11
16
## Installation
12
17
13
-
`fresh_graphql` hooks into the `dev.ts` lifecycle of fresh, [create a fresh project](https://fresh.deno.dev/docs/getting-started/create-a-project) if you haven't done so.
18
+
`fresh_graphql` hooks into the `dev.ts` lifecycle of fresh,
19
+
[create a fresh project](https://fresh.deno.dev/docs/getting-started/create-a-project)
20
+
if you haven't done so.
14
21
15
22
You need to patch 3 files from an existing fresh project:
1.`@graphql-yoga/common` is chosen for it's simplicity, you may use any GraphQL serveres compatible with `@graphql-tools/schema`.
92
-
1.`fresh_graphql.gen.ts` This is the manifest file generated whenever you make changes to source codes in the `./graphql` directory.
99
+
1.`@graphql-yoga/common` is chosen for it's simplicity, you may use any GraphQL
100
+
serveres compatible with `@graphql-tools/schema`.
101
+
1.`fresh_graphql.gen.ts` This is the manifest file generated whenever you make
102
+
changes to source codes in the `./graphql` directory.
93
103
94
104
### Queries and Mutations
95
105
96
-
The example below follows the naming convension and use `mod.ts`, but you may name your TypeScript and/or JavaScript files anyway you like.
106
+
The example below follows the naming convension and use `mod.ts`, but you may
107
+
name your TypeScript and/or JavaScript files anyway you like.
97
108
98
109
```ts
99
110
// ./graphql/Query/test/mod.ts
@@ -107,9 +118,12 @@ export const schema = `
107
118
exportconst resolver = () =>"Hello World!";
108
119
```
109
120
110
-
Schema level types, `Query`, `Mutation` and `Subscription`, will be automatically created when such a corresponding extension statement is found.
121
+
Schema level types, `Query`, `Mutation` and `Subscription`, will be
122
+
automatically created when such a corresponding extension statement is found.
111
123
112
-
Resolver object will be wrapped according to the directory structure, i.e. `{ Query: { foo: resolver } }`. To override this behavior, export an object instead.
124
+
Resolver object will be wrapped according to the directory structure, i.e.
125
+
`{ Query: { foo: resolver } }`. To override this behavior, export an object
0 commit comments