@flightdev/graphql 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -9
- package/package.json +7 -1
package/README.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @flightdev/graphql
|
|
2
2
|
|
|
3
3
|
GraphQL adapter for Flight Framework. Optional, non-imposing - use it only if you need GraphQL.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install @
|
|
8
|
+
npm install @flightdev/graphql graphql graphql-yoga
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Quick Start
|
|
@@ -14,8 +14,8 @@ Create a GraphQL endpoint in your Flight app:
|
|
|
14
14
|
|
|
15
15
|
```typescript
|
|
16
16
|
// src/routes/api/graphql.ts
|
|
17
|
-
import { createGraphQLHandler } from '@
|
|
18
|
-
import { yogaAdapter } from '@
|
|
17
|
+
import { createGraphQLHandler } from '@flightdev/graphql';
|
|
18
|
+
import { yogaAdapter } from '@flightdev/graphql/yoga';
|
|
19
19
|
import { schema } from '../../graphql/schema';
|
|
20
20
|
|
|
21
21
|
const handler = createGraphQLHandler({
|
|
@@ -61,8 +61,8 @@ export const schema = createSchema({
|
|
|
61
61
|
|
|
62
62
|
```typescript
|
|
63
63
|
import { buildSchema } from 'graphql';
|
|
64
|
-
import { createGraphQLHandler } from '@
|
|
65
|
-
import { yogaAdapter } from '@
|
|
64
|
+
import { createGraphQLHandler } from '@flightdev/graphql';
|
|
65
|
+
import { yogaAdapter } from '@flightdev/graphql/yoga';
|
|
66
66
|
|
|
67
67
|
const schema = buildSchema(/* GraphQL */ `
|
|
68
68
|
type Query {
|
|
@@ -125,7 +125,7 @@ const handler = createGraphQLHandler({
|
|
|
125
125
|
### GraphQL Yoga (Default)
|
|
126
126
|
|
|
127
127
|
```typescript
|
|
128
|
-
import { yogaAdapter } from '@
|
|
128
|
+
import { yogaAdapter } from '@flightdev/graphql/yoga';
|
|
129
129
|
```
|
|
130
130
|
|
|
131
131
|
Yoga is the recommended adapter - modern, lightweight, full fetch API support.
|
|
@@ -133,7 +133,7 @@ Yoga is the recommended adapter - modern, lightweight, full fetch API support.
|
|
|
133
133
|
### Apollo (Coming Soon)
|
|
134
134
|
|
|
135
135
|
```typescript
|
|
136
|
-
import { apolloAdapter } from '@
|
|
136
|
+
import { apolloAdapter } from '@flightdev/graphql/apollo';
|
|
137
137
|
```
|
|
138
138
|
|
|
139
139
|
## TypeScript
|
|
@@ -141,7 +141,7 @@ import { apolloAdapter } from '@flight-framework/graphql/apollo';
|
|
|
141
141
|
Full TypeScript support with type inference:
|
|
142
142
|
|
|
143
143
|
```typescript
|
|
144
|
-
import type { GraphQLContext, GraphQLAdapter } from '@
|
|
144
|
+
import type { GraphQLContext, GraphQLAdapter } from '@flightdev/graphql';
|
|
145
145
|
```
|
|
146
146
|
|
|
147
147
|
## License
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flightdev/graphql",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "GraphQL adapter for Flight Framework - optional, non-imposing",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -40,6 +40,12 @@
|
|
|
40
40
|
"adapter"
|
|
41
41
|
],
|
|
42
42
|
"license": "MIT",
|
|
43
|
+
"homepage": "https://github.com/EliosLT/FlightDev",
|
|
44
|
+
"repository": {
|
|
45
|
+
"url": "https://github.com/EliosLT/FlightDev.git",
|
|
46
|
+
"directory": "packages/graphql",
|
|
47
|
+
"type": "git"
|
|
48
|
+
},
|
|
43
49
|
"scripts": {
|
|
44
50
|
"build": "tsup",
|
|
45
51
|
"dev": "tsup --watch",
|