Skip to content

Commit 4745866

Browse files
authored
GraphQL-Modules x Nextra 3 (#2446)
1 parent 1deabe2 commit 4745866

30 files changed

+713
-827
lines changed

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
website/src/pages/docs/advanced/middlewares.mdx
2+
website/src/pages/docs/advanced/subscriptions.mdx
3+
website/src/pages/docs/di/providers.mdx
4+
website/src/pages/docs/recipes/migration.mdx

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"test": "jest",
1818
"prerelease": "yarn build",
1919
"release": "changeset publish",
20-
"format": "prettier --ignore-path .gitignore --write \"packages/**/*.{js,jsx,json,css,md,mdx,ts,tsx}\"",
20+
"format": "prettier --cache --ignore-path .gitignore --ignore-path .prettierignore --check --write \"{packages,website}/**/*.{js,jsx,json,css,md,mdx,ts,tsx}\"",
2121
"pr": "changeset",
2222
"lint": "eslint \"packages/**/*.{js,jsx,ts,tsx}\"",
2323
"benchmark:basic": "NODE_ENV=production ts-node --project tsconfig.app.json benchmark/basic.case.ts",

packages/graphql-modules/src/application/context.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { executionContext, ExecutionContextPicker } from './execution-context';
1010
export type ExecutionContextBuilder<
1111
TContext extends {
1212
[key: string]: any;
13-
} = {}
13+
} = {},
1414
> = (context: TContext) => {
1515
context: InternalAppContext;
1616
ɵdestroy(): void;

packages/graphql-modules/src/di/registry.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ import { resolveForwardRef } from './forward-ref';
33
import { Type } from './providers';
44

55
export class Key {
6-
constructor(public token: Type<any>, public id: number) {
6+
constructor(
7+
public token: Type<any>,
8+
public id: number
9+
) {
710
if (!token) {
811
throw new Error('Token must be defined!');
912
}

packages/graphql-modules/src/di/resolution.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ export type GlobalProviderMap = {
2626
};
2727

2828
export class ResolvedProvider {
29-
constructor(public key: Key, public factory: ResolvedFactory) {}
29+
constructor(
30+
public key: Key,
31+
public factory: ResolvedFactory
32+
) {}
3033
}
3134

3235
export class ResolvedFactory {
@@ -55,7 +58,10 @@ export class ResolvedFactory {
5558
}
5659

5760
export class Dependency {
58-
constructor(public key: Key, public optional: boolean) {}
61+
constructor(
62+
public key: Key,
63+
public optional: boolean
64+
) {}
5965

6066
static fromKey(key: Key): Dependency {
6167
return new Dependency(key, false);

packages/graphql-modules/src/testing/graphql.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { ValueOrPromise } from '../shared/types';
55

66
export function execute<
77
TResult = { [key: string]: any },
8-
TVariables = { [key: string]: any }
8+
TVariables = { [key: string]: any },
99
>(
1010
app: Application,
1111
inputs: Omit<ExecutionArgs, 'schema'> & {

website/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@
1111
"analyze": "cross-env ANALYZE=true next build"
1212
},
1313
"dependencies": {
14-
"@theguild/components": "5.2.6",
14+
"@theguild/components": "6.0.0",
1515
"next": "13.5.4",
1616
"next-sitemap": "4.2.3",
1717
"react": "18.2.0",
18-
"react-dom": "18.2.0",
19-
"wrangler": "3.11.0"
18+
"react-dom": "18.2.0"
2019
},
2120
"browserslist": {
2221
"production": [

website/src/pages/_meta.json

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

website/src/pages/_meta.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
export default {
2+
index: {
3+
title: 'Home',
4+
type: 'page',
5+
display: 'hidden',
6+
theme: {
7+
layout: 'raw',
8+
},
9+
},
10+
docs: {
11+
title: 'Docs',
12+
type: 'page',
13+
},
14+
};

website/src/pages/docs/_meta.json

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

0 commit comments

Comments
 (0)