Skip to content

Commit

Permalink
docs: update docs to include links to error plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
hayes committed Jun 28, 2021
1 parent 2b03d2b commit 46db92d
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,5 @@ new ApolloServer({
Integrate with existing schema graphql directives in a type-safe way.
- ## [Smart Subscriptions](https://giraphql.com/plugins/smart-subscriptions)
Make any part of your graph subscribable to get live updates as your data changes.
- ## [Errors](https://giraphql.com/plugins/errors.md)
A plugin for easily including error types in your GraphQL schema and hooking up error types to resolvers.
2 changes: 2 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,5 @@ new ApolloServer({
Integrate with existing schema graphql directives in a type-safe way.
- ## [Smart Subscriptions](plugins/smart-subscriptions.md)
Make any part of your graph subscribable to get live updates as your data changes.
- ## [Errors](plugins/errors.md)
A plugin for easily including error types in your GraphQL schema and hooking up error types to resolvers.
2 changes: 2 additions & 0 deletions docs/plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@
Integrate with existing schema graphql directives in a type-safe way.
- ## [Smart Subscriptions](./smart-subscriptions.md)
Make any part of your graph subscribable to get live updates as your data changes.
- ## [Errors](./errors.md)
A plugin for easily including error types in your GraphQL schema and hooking up error types to resolvers.
2 changes: 1 addition & 1 deletion docs/plugins/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ menu: Plugins

# Errors Plugin

A plugin for easily including errors in your GraphQL schema.
A plugin for easily including error types in your GraphQL schema and hooking up error types to resolvers

## Usage

Expand Down
2 changes: 1 addition & 1 deletion packages/deno/packages/plugin-errors/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Errors Plugin

A plugin for easily including errors in your GraphQL schema.
A plugin for easily including error types in your GraphQL schema and hooking up error types to resolvers

## Usage

Expand Down
2 changes: 1 addition & 1 deletion packages/deno/packages/plugin-errors/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class GiraphQLErrorsPlugin<Types extends SchemaTypes> extends BasePlugin<
return fieldConfig;
}
const parentTypeName = this.buildCache.getTypeConfig(fieldConfig.parentType).name;
const { types = [], result: { name: resultName = `${parentTypeName}${capitalize(fieldConfig.name)}Success`, fields: resultFieldOptions, ...resultObjectOptions } = {}, union: { name: unionName = `${parentTypeName}${capitalize(fieldConfig.name)}Result`, ...unionOptions } = {}, dataField: { name: dataFieldName = "data", ...dataField } = {}, } = fieldConfig.giraphqlOptions.errors;
const { types = [], result: { name: resultName = `${parentTypeName}${capitalize(fieldConfig.name)}Success`, fields: resultFieldOptions, ...resultObjectOptions } = {} as never, union: { name: unionName = `${parentTypeName}${capitalize(fieldConfig.name)}Result`, ...unionOptions } = {} as never, dataField: { name: dataFieldName = "data", ...dataField } = {} as never, } = fieldConfig.giraphqlOptions.errors;
const resultObjectRef = this.builder.objectRef<unknown>(resultName);
resultObjectRef.implement({
...resultObjectOptions,
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-errors/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Errors Plugin

A plugin for easily including errors in your GraphQL schema.
A plugin for easily including error types in your GraphQL schema and hooking up error types to resolvers

## Usage

Expand Down

0 comments on commit 46db92d

Please sign in to comment.