diff --git a/README.md b/README.md index b1461948b..fdfb56970 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ flow, allowing developers to develop, share and collaborate on GraphQL-related plugins while filling the missing pieces in GraphQL implementations. -`envelop` aims to extend the GraphQL execution flow by adding plugins that enrichs the feature set -of your application. +`envelop` aims to extend the GraphQL execution flow by adding plugins that enrich the feature set of +your application.

@@ -171,8 +171,8 @@ Feel free to open issues and pull requests. We're always welcome support from th ### Code of Conduct Help us keep Envelop open and inclusive. Please read and follow our -[ of Conduct](https://github.com/the-guild-org/Stack/blob/master/CODE_OF_CONDUCT.md) as adopted from -[Contributor Covenant](https://www.contributor-covenant.org/) +[Code of Conduct](https://github.com/the-guild-org/Stack/blob/master/CODE_OF_CONDUCT.md) as adopted +from [Contributor Covenant](https://www.contributor-covenant.org/) ### License diff --git a/examples/apollo-server/README.md b/examples/apollo-server/README.md index 736f1df9a..5a4f784f2 100644 --- a/examples/apollo-server/README.md +++ b/examples/apollo-server/README.md @@ -3,7 +3,7 @@ This example demonstrate how to implement the basic GraphQL Envelop flow with Envelop and [`Apollo-Server`](https://github.com/apollographql/apollo-server). -In this exmaple, Apollo-Server provides the basic HTTP wrapper and execution flow, and Envelop is in +In this example, Apollo-Server provides the basic HTTP wrapper and execution flow, and Envelop is in charge of the execution runtime. ## Running this example diff --git a/examples/graphql-http/README.md b/examples/graphql-http/README.md index 1a68ad694..545e05e0c 100644 --- a/examples/graphql-http/README.md +++ b/examples/graphql-http/README.md @@ -1,6 +1,6 @@ ## Envelop example with GraphQL-HTTP -This example demonstrates how to implement the GraphQL flow with Envelop and the offical GraphQL +This example demonstrates how to implement the GraphQL flow with Envelop and the official GraphQL over HTTP library [`graphql-http`](https://github.com/graphql/graphql-http). ## Running this example diff --git a/packages/core/test/schema-change.spec.ts b/packages/core/test/schema-change.spec.ts index d0818549b..b1bacaae7 100644 --- a/packages/core/test/schema-change.spec.ts +++ b/packages/core/test/schema-change.spec.ts @@ -16,7 +16,7 @@ describe('schemaChange', () => { expect(spiedPlugin.spies.onSchemaChange).toHaveBeenCalledTimes(0); }); - it('Should trigger schema change only for plugins that doesnt triggered the change itself', async () => { + it("Should trigger schema change only for plugins that don't trigger the change itself", async () => { const pluginA = { onSchemaChange: jest.fn() }; const pluginB = { onSchemaChange: jest.fn() }; diff --git a/packages/plugins/persisted-operations/src/plugin.ts b/packages/plugins/persisted-operations/src/plugin.ts index b20e343a5..89e178e40 100644 --- a/packages/plugins/persisted-operations/src/plugin.ts +++ b/packages/plugins/persisted-operations/src/plugin.ts @@ -15,11 +15,11 @@ export type UsePersistedOperationsOptions = { */ store: PersistedOperationsStore | PersistedOperationsFunctionStore; /** - * Function that returns the operation id, e.g. by retrieving it from cusotm properties within context + * Function that returns the operation id, e.g. by retrieving it from custom properties within context */ extractOperationId?: (context: Readonly) => string | undefined; /** - * Callback function to notify consumer of missing hash match, f.i. to log, monitor and/or analise these events + * Callback function to notify consumer of missing hash match, f.i. to log, monitor and/or analyse these events */ onMissingMatch?: (context: Readonly, operationId: string) => void; }; diff --git a/packages/plugins/prometheus/README.md b/packages/plugins/prometheus/README.md index 16af446fc..7830cbd02 100644 --- a/packages/plugins/prometheus/README.md +++ b/packages/plugins/prometheus/README.md @@ -5,7 +5,7 @@ on `prom-client`). You can opt-in to collect tracing from the following phases: -- Sucessfull requests (`requestCount`) +- Successful requests (`requestCount`) - Request summary (`requestSummary`) - errors (categorized by `phase`) - resolvers tracing and runtime @@ -37,8 +37,8 @@ const getEnveloped = envelop({ // ... other plugins ... usePrometheus({ // all optional, and by default, all set to false, please opt-in to the metrics you wish to get - requestCount: true, // requries `execute` to be true as well - requestSummary: true, // requries `execute` to be true as well + requestCount: true, // requires `execute` to be true as well + requestSummary: true, // requires `execute` to be true as well parse: true, validate: true, contextBuilding: true, diff --git a/packages/plugins/prometheus/test/prom.spec.ts b/packages/plugins/prometheus/test/prom.spec.ts index 135e76264..03f022a23 100644 --- a/packages/plugins/prometheus/test/prom.spec.ts +++ b/packages/plugins/prometheus/test/prom.spec.ts @@ -579,7 +579,7 @@ describe('Prom Metrics plugin', () => { expect(await metricCount('graphql_envelop_request')).toBe(0); }); - it('Should trace all sucessfull requests', async () => { + it('Should trace all successful requests', async () => { const { execute, metricCount } = prepare({ requestCount: true, execute: true }); const result = await execute('query { regularField }'); assertSingleExecutionValue(result); @@ -589,7 +589,7 @@ describe('Prom Metrics plugin', () => { expect(await metricCount('graphql_envelop_request')).toBe(1); }); - it('Should trace all sucessfull requests, with multiple req', async () => { + it('Should trace all successful requests, with multiple req', async () => { const { execute, metricValue } = prepare({ requestCount: true, execute: true }); const result1 = await execute('query { regularField }'); const result2 = await execute('query { regularField }'); @@ -613,7 +613,7 @@ describe('Prom Metrics plugin', () => { expect(await metricCount('graphql_envelop_request')).toBe(0); }); - it('Should trace all sucessfull requests', async () => { + it('Should trace all successful requests', async () => { const { execute, metricCount } = prepare({ requestSummary: true, execute: true }); const result = await execute('query { regularField }'); assertSingleExecutionValue(result); diff --git a/packages/plugins/resource-limitations/README.md b/packages/plugins/resource-limitations/README.md index c7d1352e4..bf58ca45c 100644 --- a/packages/plugins/resource-limitations/README.md +++ b/packages/plugins/resource-limitations/README.md @@ -1,8 +1,8 @@ ## `@envelop/resource-limitations` -This plugins uses `extended-valiations` concept +This plugins uses `extended-validation` concept ([details here](https://github.com/n1ru4l/envelop/tree/main/packages/plugins/extended-validation#envelopextended-validation)) -for implemeting a resource-limitations rate-limit similar to GitHub GraphQL API (see +for implementing a resource-limitations rate-limit similar to GitHub GraphQL API (see https://docs.github.com/en/graphql/overview/resource-limitations for more details) ## Getting Started diff --git a/packages/plugins/response-cache-redis/README.md b/packages/plugins/response-cache-redis/README.md index 7299dfbb2..02dfaae80 100644 --- a/packages/plugins/response-cache-redis/README.md +++ b/packages/plugins/response-cache-redis/README.md @@ -1,7 +1,7 @@ ## `@envelop/response-cache-redis` - Supports redis cache for `@envelop/response-cache` plugin -- Suitable for serveless deployments where the LRU In-Memory Cache is not possible +- Suitable for serverless deployments where the LRU In-Memory Cache is not possible [Check out the GraphQL Response Cache Guide for more information](https://envelop.dev/docs/guides/adding-a-graphql-response-cache) diff --git a/packages/plugins/response-cache/README.md b/packages/plugins/response-cache/README.md index e0271e1e7..d6f3e13d7 100644 --- a/packages/plugins/response-cache/README.md +++ b/packages/plugins/response-cache/README.md @@ -316,7 +316,7 @@ const getEnveloped = envelop({ ### Enforce if a type or a field should only be cached based on session/user -Some types or fields in the schemas should never be globaly cached. Its data is always linked to a +Some types or fields in the schemas should never be globally cached. Its data is always linked to a session or user. `PRIVATE` scope allows to enforce this fact and ensure that responses with a `PRIVATE` scope will never be cached without a session. The default scope for all types and fields is `PUBLIC`. diff --git a/website/src/pages/v3/guides/migrating-from-v2-to-v3.mdx b/website/src/pages/v3/guides/migrating-from-v2-to-v3.mdx index 3d7b8e266..e029eb888 100644 --- a/website/src/pages/v3/guides/migrating-from-v2-to-v3.mdx +++ b/website/src/pages/v3/guides/migrating-from-v2-to-v3.mdx @@ -62,7 +62,7 @@ const getEnveloped = envelop({ This plugin was dependent on tracing the schema. As we no longer support wrap the schema out of the box we decided to drop this plugin. -At this moment we do not have any alternative. We recommned using a +At this moment we do not have any alternative. We recommend using a [tracing solution](/v3/guides/monitoring-and-tracing). ## 3. Remove `EnvelopError` diff --git a/website/src/pages/v3/guides/securing-your-graphql-api.mdx b/website/src/pages/v3/guides/securing-your-graphql-api.mdx index 95c8f7235..8ab72b100 100644 --- a/website/src/pages/v3/guides/securing-your-graphql-api.mdx +++ b/website/src/pages/v3/guides/securing-your-graphql-api.mdx @@ -101,8 +101,8 @@ const getEnveloped = envelop({ ### Reject Malicious Operation Documents -Parsing a GraphQL operation document is a very expensive and compute intensitive operation that -blocks the JavaScript event loop. If an attacker sends a very complex operation document with slight +Parsing a GraphQL operation document is a very expensive and compute intensive operation that blocks +the JavaScript event loop. If an attacker sends a very complex operation document with slight variations over and over again he can easily degrade the performance of the GraphQL server. Because of the variations simply having an LRU cache for parsed operation documents is not enough. diff --git a/website/src/pages/v3/plugins/index.mdx b/website/src/pages/v3/plugins/index.mdx index a462849d3..65bc41950 100644 --- a/website/src/pages/v3/plugins/index.mdx +++ b/website/src/pages/v3/plugins/index.mdx @@ -34,6 +34,7 @@ The plugin order specifies the order in which the handlers of each plugin will b `onExecute` hook of the plugin at the array index 0 will always be invoked before the plugin at the index 1. -Plugins have the option to stop the execution completly and stop calling further plugins `onExecute` -hooks. The `useResponseCache` plugin is such a plugin. Once a response is served from the cache all -further `onExecute` are never called and all `onExecuteDone` hooks are never called at all. +Plugins have the option to stop the execution completely and stop calling further plugins +`onExecute` hooks. The `useResponseCache` plugin is such a plugin. Once a response is served from +the cache all further `onExecute` are never called and all `onExecuteDone` hooks are never called at +all.