Skip to content

Commit

Permalink
docs(server): typos in comments (#508)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc d'Entremont authored Oct 6, 2023
1 parent cddf840 commit 4f4ac19
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export type OperationResult =
/**
* A concrete GraphQL execution context value type.
*
* Mainly used because TypeScript collapes unions
* Mainly used because TypeScript collapses unions
* with `any` or `unknown` to `any` or `unknown`. So,
* we use a custom type to allow definitions such as
* the `context` server option.
Expand Down Expand Up @@ -253,7 +253,7 @@ export interface ServerOptions<
* consider using the `onComplete` callback.
*
* In comparison to `onDisconnect`, this callback will ALWAYS
* be called, regardless if the user succesfully went through
* be called, regardless if the user successfully went through
* the connection initialisation or not. `onConnect` might not
* called before the `onClose`.
*/
Expand Down Expand Up @@ -301,7 +301,7 @@ export interface ServerOptions<
| void;
/**
* Executed after the operation call resolves. For streaming
* operations, triggering this callback does not necessarely
* operations, triggering this callback does not necessarily
* mean that there is already a result available - it means
* that the subscription process for the stream has resolved
* and that the client is now subscribed.
Expand All @@ -326,7 +326,7 @@ export interface ServerOptions<
result: OperationResult,
) => Promise<OperationResult | void> | OperationResult | void;
/**
* Executed after an error occured right before it
* Executed after an error occurred right before it
* has been dispatched to the client.
*
* Use this callback to format the outgoing GraphQL
Expand Down Expand Up @@ -401,7 +401,7 @@ export interface ServerOptions<
/** @category Server */
export interface Server<E = undefined> {
/**
* New socket has beeen established. The lib will validate
* New socket has been established. The lib will validate
* the protocol and use the socket accordingly. Returned promise
* will resolve after the socket closes.
*
Expand All @@ -424,7 +424,7 @@ export interface Server<E = undefined> {
export interface WebSocket {
/**
* The subprotocol of the WebSocket. Will be used
* to validate agains the supported ones.
* to validate against the supported ones.
*/
readonly protocol: string;
/**
Expand Down Expand Up @@ -468,7 +468,7 @@ export interface WebSocket {
* first argument.
*
* If this listener is implemented, the server will NOT automatically reply
* to any pings from the client. Implementing it makes it your resposibility
* to any pings from the client. Implementing it makes it your responsibility
* to decide how and when to respond.
*/
onPing?(payload: PingMessage['payload']): Promise<void> | void;
Expand Down Expand Up @@ -522,7 +522,7 @@ export interface Context<
}

/**
* Makes a Protocol complient WebSocket GraphQL server. The server
* Makes a Protocol compliant WebSocket GraphQL server. The server
* is actually an API which is to be used with your favourite WebSocket
* server library!
*
Expand Down Expand Up @@ -772,7 +772,7 @@ export function makeServer<
new GraphQLError('Unable to identify operation'),
]);

// if `onSubscribe` didnt specify a rootValue, inject one
// if `onSubscribe` didn't specify a rootValue, inject one
if (!('rootValue' in execArgs))
execArgs.rootValue = roots?.[operationAST.operation];

Expand Down Expand Up @@ -823,7 +823,7 @@ export function makeServer<
}

// lack of subscription at this point indicates that the client
// completed the subscription, he doesnt need to be reminded
// completed the subscription, he doesn't need to be reminded
await emit.complete(id in ctx.subscriptions);
} finally {
// whatever happens to the subscription, we finally want to get rid of the reservation
Expand Down

0 comments on commit 4f4ac19

Please sign in to comment.