Skip to content

Commit

Permalink
New docs and website based on Nextra (#7981)
Browse files Browse the repository at this point in the history
* nextra setup

move getting-started/index.mdx

move getting-started/installation.mdx

move getting-started/development-workflow

move guides/further-reading

getting-started/index.mdx

move to src/pages/docs

getting-started/installation.mdx

guides/react

getting-started/vue.mdx

getting-started/angular.mdx

getting-started/svelte.mdx

getting-started/front-end-typescript-only.mdx

getting-started/apollo

getting-started/graphqlmodules.mdx

getting-started/angular.mdx

move config-reference

docs/config-reference/codegen-config

getting-started/schema-field.mdx

getting-started/documents.mdx

getting-started/config-field.mdx

getting-started/require-field.mdx

getting-started/naming-convention.mdx

getting-started/lifecycle-hooks

move advanced

advanced/generated-files-colocation

remove isDev

advanced/programmatic

advanced/how-does-it-work

advanced/profiler

move integrations

all integrations

custom codegen

custom-codegen

migration

setup plugins page

fixes

fixes

fixes

patch

temp-styles

ok, styles works

react-apollo, react-query, resolvers

operations, oclif

new plugins migrated

migrate new plugins

new plugins

migrate plugins

migrate plugins

migrate plugins

migrate plugins

migrate apollo-angular and client-helpers to typescript folder

c-sharp migrate

flow in folder

move presets

move other

migrate java

move typescripts

move typescripts

move typescripts

add plugin hub page, fix layout: raw

ok it's works

remove unused deps

generate config schema

add legacy redirects

add patches for nextra

fix deploy

yet another fix

remove <OperationsNote/>

enhance code-blocks with filename

prettier

use latest next and guild-components

* refactor(scripts): Algolia scripts now supports Nextra (#8011)

* rebase fixes

* rename plugin hub to plugins

* fix typescript plugins titles

* fix rest of titles

* add patches

* quick fix for mobile

* fixes select styles on home page

Co-authored-by: Charly POLY <[email protected]>
  • Loading branch information
dimaMachina and charlypoly authored Jul 12, 2022
1 parent 2fff709 commit b1d7d91
Show file tree
Hide file tree
Showing 179 changed files with 7,606 additions and 4,141 deletions.
17 changes: 5 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,14 @@
.idea
.idea/
.npmrc
.yarnclean
.DS_Store
coverage
npm-debug.log
lerna-debug.log
yarn-error.log
node_modules
website/build
website/functions
website/i18n
website/static/live-demo
*.log
node_modules/
temp
test-results/
junit.xml
dist
.bob
dist/
.bob/
out.txt
.cache
tsconfig.tsbuildinfo
Expand Down
12 changes: 9 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ CHANGELOG.md
.husky/_/
.changeset/*.md

# temporarly ignore follow files because prettier-ignore comments don't work in mdx2
# temporarily ignore follow files because prettier-ignore comments don't work in mdx2
# see https://github.com/prettier/prettier/pull/12208
website/docs/advanced/how-does-it-work.mdx
website/docs/getting-started/development-workflow.mdx
website/src/pages/docs/advanced/generated-files-colocation.mdx
website/src/pages/docs/advanced/how-does-it-work.mdx
website/src/pages/docs/config-reference/schema-field.mdx
website/src/pages/docs/getting-started/index.mdx
website/src/pages/docs/guides/graphql-server-apollo-yoga.mdx
website/src/pages/docs/guides/react.mdx
website/src/pages/plugins/index.mdx
website/src/pages/plugins/presets/near-operation-file-preset.mdx
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,7 @@
"packages/**/src/**/*.{ts,tsx}": [
"eslint --fix"
],
"**/*.{ts,tsx,graphql,yml}": [
"prettier --write"
],
"**/*.json": [
"**/*.{js,jsx,cjs,mjs,ts,tsx,graphql,gql,yml,yaml,json,md}": [
"prettier --write"
],
"yarn.lock": [
Expand Down
6 changes: 3 additions & 3 deletions packages/plugins/flow/operations/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export interface FlowDocumentsPluginConfig extends RawDocumentsConfig {
* @default true
*
* @exampleMarkdown
* ```yaml
* ```yaml {6}
* generates:
* path/to/file.ts:
* plugins:
Expand All @@ -28,7 +28,7 @@ export interface FlowDocumentsPluginConfig extends RawDocumentsConfig {
* @default false
*
* @exampleMarkdown
* ```yaml
* ```yaml {6}
* generates:
* path/to/file.ts:
* plugins:
Expand All @@ -43,7 +43,7 @@ export interface FlowDocumentsPluginConfig extends RawDocumentsConfig {
* @default false
*
* @exampleMarkdown
* ```yaml
* ```yaml {7}
* generates:
* path/to/file.ts:
* plugins:
Expand Down
8 changes: 4 additions & 4 deletions packages/plugins/other/fragment-matcher/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ interface PossibleTypesResultData {
*
* If you are using `apollo-client` and your schema contains `interface` or `union` declaration, it's recommended to use Apollo's Fragment Matcher and the result generated by the plugin.
*
* You can read more about it in `apollo-client` documentation: https://www.apollographql.com/docs/react/data/fragments/#fragments-on-unions-and-interfaces.
* You can read more about it in [`apollo-client` documentation](https://apollographql.com/docs/react/data/fragments/#fragments-on-unions-and-interfaces).
*
* Fragment Matcher plugin accepts a TypeScript / JavaScript or a JSON file as an output _(`.ts, .tsx, .js, .jsx, .json`)_.
*
Expand All @@ -42,7 +42,7 @@ export interface FragmentMatcherConfig {
* @default es2015
*
* @exampleMarkdown
* ```yaml
* ```yaml {6}
* generates:
* path/to/file.json:
* plugins:
Expand All @@ -57,7 +57,7 @@ export interface FragmentMatcherConfig {
* @default 3
*
* @exampleMarkdown
* ```yaml
* ```yaml {6}
* generates:
* path/to/file.ts:
* plugins:
Expand All @@ -72,7 +72,7 @@ export interface FragmentMatcherConfig {
* @default false
*
* @exampleMarkdown
* ```yaml
* ```yaml {6}
* generates:
* path/to/file.ts:
* plugins:
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/other/introspection/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export interface IntrospectionPluginConfig {
* @default false
*
* @exampleMarkdown
* ```yaml
* ```yaml {6}
* generates:
* introspection.json:
* plugins:
Expand Down
6 changes: 3 additions & 3 deletions packages/plugins/other/schema-ast/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export interface SchemaASTConfig {
* @default false
*
* @exampleMarkdown
* ```yaml
* ```yaml {8}
* schema:
* - './src/schema.graphql'
* generates:
Expand All @@ -43,7 +43,7 @@ export interface SchemaASTConfig {
* @default false
*
* @exampleMarkdown
* ```yaml
* ```yaml {8}
* schema:
* - './src/schema.graphql'
* generates:
Expand All @@ -60,7 +60,7 @@ export interface SchemaASTConfig {
* @default false
*
* @exampleMarkdown
* ```yaml
* ```yaml {7}
* schema: http://localhost:3000/graphql
* generates:
* schema.graphql:
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/other/time/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export interface TimePluginConfig {
* @default YYYY-MM-DDTHH:mm:ssZ
*
* @exampleMarkdown
* ```yaml
* ```yaml {4-5}
* generates:
* path/to/file.ts:
* plugins:
Expand All @@ -18,7 +18,7 @@ export interface TimePluginConfig {
* @default 'Generated on'
*
* @exampleMarkdown
* ```yaml
* ```yaml {4-5}
* generates:
* path/to/file.ts:
* plugins:
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/other/urql-introspection/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export interface UrqlIntrospectionConfig {
* @default es2015
*
* @exampleMarkdown
* ```yaml
* ```yaml {6}
* generates:
* path/to/file.json:
* plugins:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export interface RawResolversConfig extends RawConfig {
* @description Adds `_` to generated `Args` types in order to avoid duplicate identifiers.
*
* @exampleMarkdown
* ```yaml
* ```yaml {2}
* config:
* addUnderscoreToArgsType: true
* ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export interface RawTypesConfig extends RawConfig {
* @exampleMarkdown
* ## Override all definition types
*
* ```yml
* ```yaml
* generates:
* path/to/file.ts:
* plugins:
Expand Down
12 changes: 6 additions & 6 deletions packages/plugins/other/visitor-plugin-common/src/base-visitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export interface RawConfig {
* @default false
*
* @exampleMarkdown
* ```yaml
* ```yaml {2}
* config:
* strictScalars: true
* ```
Expand All @@ -57,7 +57,7 @@ export interface RawConfig {
* @default any
*
* @exampleMarkdown
* ```yaml
* ```yaml {2}
* config:
* defaultScalarType: unknown
* ```
Expand Down Expand Up @@ -123,7 +123,7 @@ export interface RawConfig {
* @description Prefixes all the generated types.
*
* @exampleMarkdown
* ```yaml
* ```yaml {2}
* config:
* typesPrefix: I
* ```
Expand All @@ -134,7 +134,7 @@ export interface RawConfig {
* @description Suffixes all the generated types.
*
* @exampleMarkdown
* ```yaml
* ```yaml {2}
* config:
* typesSuffix: I
* ```
Expand All @@ -157,7 +157,7 @@ export interface RawConfig {
* in the selection set, and makes it non-optional
*
* @exampleMarkdown
* ```yaml
* ```yaml {2}
* config:
* nonOptionalTypename: true
* ```
Expand All @@ -171,7 +171,7 @@ export interface RawConfig {
* compatibility with TypeScript's "importsNotUsedAsValues": "error" option
*
* @example
* ```yaml
* ```yaml {2}
* config:
* useTypeImports: true
* ```
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/typescript/typescript/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export interface TypeScriptPluginConfig extends RawTypesConfig {
* @default false
*
* @exampleMarkdown Override all definition types
* ```yml
* ```yaml
* generates:
* path/to/file.ts:
* plugins:
Expand Down
4 changes: 2 additions & 2 deletions packages/presets/gql-tag-operations/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export type GqlTagConfig = {
* E.g. `graphql-tag` or `@urql/core`.
*
* @exampleMarkdown
* ```yaml
* ```yaml {5}
* generates:
* gql/:
* preset: gql-tag-operations-preset
Expand All @@ -50,7 +50,7 @@ export type GqlTagConfig = {
*
* When using the `augmentedModuleName` option, the unmask function will by default NOT be imported from the same module. It will still be generated to a `index.ts` file. You can, however, specify to resolve the unmasking function from an an augmented module by using the `augmentedModuleName` object sub-config.
* @exampleMarkdown
* ```yaml
* ```yaml {6-7}
* generates:
* gql/:
* preset: gql-tag-operations-preset
Expand Down
4 changes: 2 additions & 2 deletions packages/presets/import-types/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export type ImportTypesConfig = {
* The key of the output is used a the base path for this file.
*
* @exampleMarkdown
* ```yaml
* ```yaml {5}
* generates:
* path/to/file.ts:
* preset: import-types
Expand All @@ -24,7 +24,7 @@ export type ImportTypesConfig = {
* @default Types
*
* @exampleMarkdown
* ```yaml
* ```yaml {6}
* generates:
* src/:
* preset: import-types
Expand Down
12 changes: 6 additions & 6 deletions packages/presets/near-operation-file/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export type NearOperationFileConfig = {
* If you wish to use an NPM package or a local workspace package, make sure to prefix the package name with `~`.
*
* @exampleMarkdown
* ```yaml
* ```yaml {5}
* generates:
* src/:
* preset: near-operation-file
Expand All @@ -45,7 +45,7 @@ export type NearOperationFileConfig = {
* If you wish to use an NPM package or a local workspace package, make sure to prefix the package name with `~`.
*
* @exampleMarkdown
* ```yaml
* ```yaml {6}
* generates:
* src/:
* preset: near-operation-file
Expand All @@ -62,7 +62,7 @@ export type NearOperationFileConfig = {
* @default .generated.ts
*
* @exampleMarkdown
* ```yaml
* ```yaml {6}
* generates:
* src/:
* preset: near-operation-file
Expand All @@ -80,7 +80,7 @@ export type NearOperationFileConfig = {
* @default process.cwd()
*
* @exampleMarkdown
* ```yaml
* ```yaml {6}
* generates:
* src/:
* preset: near-operation-file
Expand All @@ -97,7 +97,7 @@ export type NearOperationFileConfig = {
* @default ''
*
* @exampleMarkdown
* ```yaml
* ```yaml {6}
* generates:
* src/:
* preset: near-operation-file
Expand All @@ -114,7 +114,7 @@ export type NearOperationFileConfig = {
* @default Types
*
* @exampleMarkdown
* ```yaml
* ```yaml {6}
* generates:
* src/:
* preset: near-operation-file
Expand Down
Loading

1 comment on commit b1d7d91

@vercel
Copy link

@vercel vercel bot commented on b1d7d91 Jul 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.