Skip to content

Commit

Permalink
Fix a number of typos across various files (apollographql#8776)
Browse files Browse the repository at this point in the history
  • Loading branch information
frankie303 authored Sep 17, 2021
1 parent a0db6bf commit d3a74ec
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/__tests__/local-state/export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ describe('@client @export tests', () => {

it(
'should store the @client field value in the specified @export ' +
'variable, and make it avilable to a subsequent resolver',
'variable, and make it available to a subsequent resolver',
done => {
const query = gql`
query currentAuthorPostCount($authorId: Int!) {
Expand Down
2 changes: 1 addition & 1 deletion src/cache/core/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export abstract class ApolloCache<TSerialized> implements DataProxy {
// removed from the cache.
public abstract evict(options: Cache.EvictOptions): boolean;

// intializer / offline / ssr API
// initializer / offline / ssr API
/**
* Replaces existing state in the cache (if any) with the values expressed by
* `serializedState`.
Expand Down
2 changes: 1 addition & 1 deletion src/cache/inmemory/entityStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ class CacheGroup {
// so the result caching system would do well to "forget everything it
// knows" about that object. To achieve that kind of invalidation, we
// not only dirty the associated result cache entry, but also remove it
// completely from the dependency graph. For the optimism implmentation
// completely from the dependency graph. For the optimism implementation
// details, see https://github.com/benjamn/optimism/pull/195.
storeFieldName === "__exists" ? "forget" : "setDirty",
);
Expand Down
2 changes: 1 addition & 1 deletion src/cache/inmemory/readFromStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function execSelectionSetKeyArgs(
}

export class StoreReader {
// cached version of executeSelectionset
// cached version of executeSelectionSet
private executeSelectionSet: OptimisticWrapperFunction<
[ExecSelectionSetOptions], // Actual arguments tuple type.
ExecResult, // Actual return type.
Expand Down
2 changes: 1 addition & 1 deletion src/core/ApolloClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ export class ApolloClient<TCacheShape> implements DataProxy {
* it uses Apollo's store in order to reactively deliver updates to your query results.
* <p /><p />
* For example, suppose you call watchQuery on a GraphQL query that fetches a person's
* first and last name and this person has a particular object identifer, provided by
* first and last name and this person has a particular object identifier, provided by
* dataIdFromObject. Later, a different query fetches that same person's
* first and last name and the first name has now changed. Then, any observers associated
* with the results of the first query will be updated with a new result object.
Expand Down
2 changes: 1 addition & 1 deletion src/core/ObservableQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ export function applyNextFetchPolicy<TData, TVars>(
// network request, it may be desirable for subsequent network requests to
// be triggered only if the cache result is incomplete. To that end, the
// options.nextFetchPolicy option provides an easy way to update
// options.fetchPolicy after the intial network request, without having to
// options.fetchPolicy after the initial network request, without having to
// call observableQuery.setOptions.
options.fetchPolicy = typeof nextFetchPolicy === "function"
? nextFetchPolicy.call(options, fetchPolicy)
Expand Down
4 changes: 2 additions & 2 deletions src/core/watchQueryOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ export interface MutationBaseOptions<
* This function will be called twice over the lifecycle of a mutation. Once
* at the very beginning if an `optimisticResponse` was provided. The writes
* created from the optimistic data will be rolled back before the second time
* this function is called which is when the mutation has succesfully
* this function is called which is when the mutation has successfully
* resolved. At that point `update` will be called with the *actual* mutation
* result and those writes will not be rolled back.
*
Expand Down Expand Up @@ -281,7 +281,7 @@ export interface MutationBaseOptions<
* The context to be passed to the link execution chain. This context will
* only be used with this mutation. It will not be used with
* `refetchQueries`. Refetched queries use the context they were
* initialized with (since the intitial context is stored as part of the
* initialized with (since the initial context is stored as part of the
* `ObservableQuery` instance). If a specific context is needed when
* refetching queries, make sure it is configured (via the
* [query `context` option](https://www.apollographql.com/docs/react/api/apollo-client#ApolloClient.query))
Expand Down
2 changes: 1 addition & 1 deletion src/react/hooks/__tests__/useQuery.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1455,7 +1455,7 @@ describe('useQuery Hook', () => {
expect(result.current.data).toEqual({ letters: ab.concat(cd) });
});

it('fetchMore with concatPagnination and notifyOnNetworkStatusChange', async () => {
it('fetchMore with concatPagination and notifyOnNetworkStatusChange', async () => {
const cache = new InMemoryCache({
typePolicies: {
Query: {
Expand Down
2 changes: 1 addition & 1 deletion src/react/parser/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function operationName(type: DocumentType) {
return name;
}

// This parser is mostly used to saftey check incoming documents.
// This parser is mostly used to safety check incoming documents.
export function parser(document: DocumentNode): IDocumentDefinition {
const cached = cache.get(document);
if (cached) return cached;
Expand Down
4 changes: 2 additions & 2 deletions src/utilities/graphql/__tests__/getFromAST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ describe('AST utility functions', () => {
});

it('should throw if type definitions found in document', () => {
const queryWithTypeDefination = gql`
const queryWithTypeDefinition = gql`
fragment authorDetails on Author {
firstName
lastName
Expand All @@ -209,7 +209,7 @@ describe('AST utility functions', () => {
}
`;
expect(() => {
getQueryDefinition(queryWithTypeDefination);
getQueryDefinition(queryWithTypeDefinition);
}).toThrowError(
'Schema type definitions not allowed in queries. Found: "InputObjectTypeDefinition"',
);
Expand Down
2 changes: 1 addition & 1 deletion src/utilities/testing/mocking/mockFetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export class MockFetch {

// Returns a "fetch" function equivalent that mocks the given responses.
// The function by returned by this should be tacked onto the global scope
// inorder to test functions that use "fetch".
// in order to test functions that use "fetch".
public getFetch() {
return this.fetch.bind(this);
}
Expand Down

0 comments on commit d3a74ec

Please sign in to comment.