Skip to content

Commit

Permalink
fix: typos (#1929)
Browse files Browse the repository at this point in the history
  • Loading branch information
albertothedev authored Aug 17, 2023
1 parent 3be5d3d commit 829d468
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 25 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<p align="center">
<img height="150" src="./logo.png">
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion examples/apollo-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/graphql-http/README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/schema-change.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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() };

Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/persisted-operations/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ export type UsePersistedOperationsOptions<ContextType = DefaultContext> = {
*/
store: PersistedOperationsStore | PersistedOperationsFunctionStore<ContextType>;
/**
* 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<ContextType>) => 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<ContextType>, operationId: string) => void;
};
Expand Down
6 changes: 3 additions & 3 deletions packages/plugins/prometheus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions packages/plugins/prometheus/test/prom.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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 }');
Expand All @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/resource-limitations/README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/response-cache-redis/README.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/response-cache/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/v3/guides/migrating-from-v2-to-v3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
4 changes: 2 additions & 2 deletions website/src/pages/v3/guides/securing-your-graphql-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
7 changes: 4 additions & 3 deletions website/src/pages/v3/plugins/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit 829d468

Please sign in to comment.