Skip to content

Commit b81307f

Browse files
alinsimocardatan
authored andcommitted
[deploy_website] TGC Fixes (#1765)
* root components update * font style fixes * api docs revert
1 parent c1641ee commit b81307f

File tree

5 files changed

+76
-181
lines changed

5 files changed

+76
-181
lines changed

website/docs/api.md

+32-40
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@ id: api
33
title: API Reference
44
---
55

6-
7-
86
## CONTEXT
7+
98
[_source file_](https://github.com/Urigo/graphql-modules/blob/master/packages/graphql-modules/src/application/tokens.ts)
109

1110
`CONTEXT` is an InjectionToken representing the provided `GraphQLModules.GlobalContext`
1211

13-
1412
```typescript
1513
import { CONTEXT, Inject, Injectable } from 'graphql-modules';
1614

@@ -21,80 +19,74 @@ export class Data {
2119
```
2220

2321
## MODULE_ID
22+
2423
[_source file_](https://github.com/Urigo/graphql-modules/blob/master/packages/graphql-modules/src/module/tokens.ts)
2524

2625
`MODULE_ID` is an InjectionToken representing module's ID
2726

28-
2927
```typescript
3028
import { MODULE_ID, Inject, Injectable } from 'graphql-modules';
3129

3230
@Injectable()
3331
export class Data {
3432
constructor(@Inject(MODULE_ID) moduleId: string) {
35-
console.log(`Data used in ${moduleId} module`)
33+
console.log(`Data used in ${moduleId} module`);
3634
}
3735
}
3836
```
3937

4038
## Application
39+
4140
[_source file_](https://github.com/Urigo/graphql-modules/blob/master/packages/graphql-modules/src/application/types.ts)
4241

4342
A return type of `createApplication` function.
4443

45-
- `typeDefs` - A list of type definitions defined by modules.
46-
- `resolvers` - An object with resolve functions defined by modules.
47-
- `schema` - Ready to use GraphQLSchema object combined from modules.
48-
- `injector` - The application (Singleton) injector.
49-
- `createOperationController` - Take over control of GraphQL Operation
50-
- `createSubscription` - Creates a `subscribe` function that runs the subscription phase of GraphQL.
51-
Important when using GraphQL Subscriptions.
52-
- `createExecution` - Creates a `execute` function that runs the execution phase of GraphQL.
53-
Important when using GraphQL Queries and Mutations.
54-
- `createSchemaForApollo` - Experimental
55-
- `createApolloExecutor` - Experimental
56-
57-
44+
- `typeDefs` - A list of type definitions defined by modules.
45+
- `resolvers` - An object with resolve functions defined by modules.
46+
- `schema` - Ready to use GraphQLSchema object combined from modules.
47+
- `injector` - The application (Singleton) injector.
48+
- `createOperationController` - Take over control of GraphQL Operation
49+
- `createSubscription` - Creates a `subscribe` function that runs the subscription phase of GraphQL.
50+
Important when using GraphQL Subscriptions.
51+
- `createExecution` - Creates a `execute` function that runs the execution phase of GraphQL.
52+
Important when using GraphQL Queries and Mutations.
53+
- `createSchemaForApollo` - Experimental
54+
- `createApolloExecutor` - Experimental
5855

5956
## ApplicationConfig
57+
6058
[_source file_](https://github.com/Urigo/graphql-modules/blob/master/packages/graphql-modules/src/application/types.ts)
6159

6260
Application's configuration object. Represents the first argument of `createApplication` function.
6361

64-
- `modules` - A list of GraphQL Modules
65-
- `providers` - A list of Providers - read the ["Providers and Tokens"](./di/providers) chapter.
66-
- `middlewares` - A map of middlewares - read the ["Middlewares"](./advanced/middlewares) chapter.
67-
- `schemaBuilder` - Creates a GraphQLSchema object out of typeDefs and resolvers
68-
69-
62+
- `modules` - A list of GraphQL Modules
63+
- `providers` - A list of Providers - read the ["Providers and Tokens"](./di/providers) chapter.
64+
- `middlewares` - A map of middlewares - read the ["Middlewares"](./advanced/middlewares) chapter.
65+
- `schemaBuilder` - Creates a GraphQLSchema object out of typeDefs and resolvers
7066

7167
## createApplication
68+
7269
[_source file_](https://github.com/Urigo/graphql-modules/blob/master/packages/graphql-modules/src/application/application.ts)
7370

7471
Creates Application out of Modules. Accepts `ApplicationConfig`.
7572

76-
7773
```typescript
7874
import { createApplication } from 'graphql-modules';
7975
import { usersModule } from './users';
8076
import { postsModule } from './posts';
8177
import { commentsModule } from './comments';
8278

8379
const app = createApplication({
84-
modules: [
85-
usersModule,
86-
postsModule,
87-
commentsModule
88-
]
89-
})
80+
modules: [usersModule, postsModule, commentsModule],
81+
});
9082
```
9183

9284
## createModule
85+
9386
[_source file_](https://github.com/Urigo/graphql-modules/blob/master/packages/graphql-modules/src/module/module.ts)
9487

9588
Creates a Module, an element used by Application. Accepts `ModuleConfig`.
9689

97-
9890
```typescript
9991
import { createModule, gql } from 'graphql-modules';
10092

@@ -105,19 +97,19 @@ export const usersModule = createModule({
10597
`,
10698
resolvers: {
10799
// ...
108-
}
100+
},
109101
});
110102
```
111103

112104
## ModuleConfig
105+
113106
[_source file_](https://github.com/Urigo/graphql-modules/blob/master/packages/graphql-modules/src/module/types.ts)
114107

115108
Module's configuration object. Represents the first argument of `createModule` function.
116109

117-
- `id` - Unique identifier of a module
118-
- `dirname` - Pass `__dirname` variable as a value to get better error messages.
119-
- `typeDefs` - An object or a list of GraphQL type definitions (SDL).
120-
- `resolvers` - An object or a list of GraphQL resolve functions.
121-
- `middlewares` - A map of middlewares - read the ["Middlewares"](./advanced/middlewares) chapter.
122-
- `providers` - A list of Providers - read the ["Providers and Tokens"](./di/providers) chapter.
123-
110+
- `id` - Unique identifier of a module
111+
- `dirname` - Pass `__dirname` variable as a value to get better error messages.
112+
- `typeDefs` - An object or a list of GraphQL type definitions (SDL).
113+
- `resolvers` - An object or a list of GraphQL resolve functions.
114+
- `middlewares` - A map of middlewares - read the ["Middlewares"](./advanced/middlewares) chapter.
115+
- `providers` - A list of Providers - read the ["Providers and Tokens"](./di/providers) chapter.

website/docusaurus.config.js

+1-81
Original file line numberDiff line numberDiff line change
@@ -45,83 +45,6 @@ module.exports = {
4545
},
4646
],
4747
},
48-
footer: {
49-
style: 'dark',
50-
copyright: `Copyright © ${new Date().getFullYear()} The Guild`,
51-
logo: {
52-
alt: 'GraphQL Modules Logo',
53-
src: 'img/logo.svg',
54-
},
55-
links: [
56-
{
57-
title: 'Docs',
58-
items: [
59-
{
60-
label: 'Getting Started',
61-
to: 'docs/get-started',
62-
},
63-
{
64-
label: `Essentials`,
65-
to: 'docs/essentials/type-definitions',
66-
},
67-
{
68-
label: 'Dependency Injection',
69-
to: 'docs/di/introduction',
70-
},
71-
{
72-
label: 'Advanced',
73-
to: 'docs//advanced/subscriptions',
74-
},
75-
{
76-
label: 'Recipes',
77-
to: 'docs/recipes/dataloader',
78-
},
79-
],
80-
},
81-
{
82-
title: 'Community',
83-
items: [
84-
{
85-
label: 'Our website',
86-
href: 'https://the-guild.dev',
87-
},
88-
{
89-
label: 'Discord',
90-
href: 'https://the-guild.dev/discord',
91-
},
92-
{
93-
label: 'Other projects',
94-
href: 'https://the-guild.dev/open-source',
95-
},
96-
{
97-
label: 'Community Meetings',
98-
href: 'https://github.com/the-guild-org/community-meetings',
99-
},
100-
],
101-
},
102-
{
103-
title: 'Social',
104-
items: [
105-
{
106-
label: 'Blog',
107-
href: 'https://the-guild.dev/blog',
108-
},
109-
{
110-
label: 'GitHub',
111-
href: 'https://github.com/Urigo/graphql-modules',
112-
},
113-
{
114-
label: 'Twitter',
115-
href: 'https://the-guild.dev/twitter',
116-
},
117-
{
118-
label: 'LinkedIn',
119-
href: 'https://the-guild.dev/linkedin',
120-
},
121-
],
122-
},
123-
],
124-
},
12548
announcementBar: {
12649
id: 'legacy-docs',
12750
content:
@@ -136,10 +59,7 @@ module.exports = {
13659
trackingID: 'UA-128969121-4',
13760
},
13861
},
139-
scripts: [
140-
'https://the-guild.dev/static/crisp.js',
141-
'/js/force-light.js',
142-
],
62+
scripts: ['https://the-guild.dev/static/crisp.js', '/js/force-light.js'],
14363
stylesheets: [
14464
'https://fonts.googleapis.com/css?family=Lato:300,400,500,600,700,800,900&display=swap',
14565
],

website/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"@docusaurus/plugin-client-redirects": "2.0.0-beta.4",
1414
"@docusaurus/plugin-ideal-image": "2.0.0-beta.4",
1515
"@docusaurus/preset-classic": "2.0.0-beta.4",
16+
"@theguild/components": "1.4.3",
1617
"@phenomnomnominal/tsquery": "4.1.1",
1718
"globby": "11.0.4",
1819
"patch-package": "6.4.7",

website/patches/@docusaurus+theme-classic+2.0.0-alpha.72.patch

-46
This file was deleted.

website/src/theme/Root.js

+42-14
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,51 @@
11
import React from 'react';
2-
import BrowserOnly from '@docusaurus/BrowserOnly';
3-
import { ThemeProvider, Header } from 'the-guild-components';
2+
import {
3+
ThemeProvider,
4+
GlobalStyles,
5+
Header,
6+
FooterExtended,
7+
} from '@theguild/components';
48

59
// Default implementation, that you can customize
610
function Root({ children }) {
711
return (
8-
<>
9-
<BrowserOnly>
10-
{() => (
11-
<ThemeProvider>
12-
<Header
13-
activeLink={'/open-source'}
14-
accentColor="var(--ifm-color-primary)"
15-
/>
16-
</ThemeProvider>
17-
)}
18-
</BrowserOnly>
12+
<ThemeProvider>
13+
<GlobalStyles includeFonts />
14+
<Header
15+
activeLink={'/open-source'}
16+
accentColor="var(--ifm-color-primary)"
17+
/>
1918
{children}
20-
</>
19+
<FooterExtended
20+
resources={[
21+
{
22+
children: 'Getting Started',
23+
title: 'Get started',
24+
href: '/docs/get-started',
25+
},
26+
{
27+
children: 'Essentials',
28+
title: 'Learn about Essentials',
29+
href: '/docs/essentials/type-definitions',
30+
},
31+
{
32+
children: 'Dependency Injection',
33+
title: 'Learn about Dependency Injection',
34+
href: '/docs/di/introduction',
35+
},
36+
{
37+
children: 'Advanced',
38+
title: 'Learn about Advanced',
39+
href: '/docs/advanced/subscriptions',
40+
},
41+
{
42+
children: 'Recipes',
43+
title: 'Learn about Recipes',
44+
href: '/docs/recipes/dataloader',
45+
},
46+
]}
47+
/>
48+
</ThemeProvider>
2149
);
2250
}
2351

0 commit comments

Comments
 (0)