Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dev-test/gatsby/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -15277,7 +15277,7 @@ type WpMediaItemMeta {
iso: Int

"""
List of keywords used to describe or identfy the media item.
List of keywords used to describe or identify the media item.
"""
keywords: [String]

Expand Down Expand Up @@ -20283,7 +20283,7 @@ type WpTaxonomy implements Node & WpNode {
public: Boolean

"""
Name of content type to diplay in REST API "wp/v2" namespace.
Name of content type to display in REST API "wp/v2" namespace.
"""
restBase: String

Expand Down
4 changes: 2 additions & 2 deletions packages/graphql-codegen-cli/src/generate-and-save.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export async function generate(
const currentHash = hash(content);

if (previousHash && currentHash === previousHash) {
debugLog(`Skipping file (${result.filename}) writing due to indentical hash...`);
debugLog(`Skipping file (${result.filename}) writing due to identical hash...`);
return;
}

Expand Down Expand Up @@ -105,7 +105,7 @@ export async function generate(
// compare the prettified content with the previous hash
// to compare the content with an existing prettified file
if (hash(content) === previousHash) {
debugLog(`Skipping file (${result.filename}) writing due to indentical hash after prettier...`);
debugLog(`Skipping file (${result.filename}) writing due to identical hash after prettier...`);
// the modified content is NOT stored in recentOutputHash
// so a diff can already be detected before executing the hook
return;
Expand Down
4 changes: 2 additions & 2 deletions packages/graphql-codegen-cli/src/utils/patterns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const makeShouldRebuild = ({
return (path: string) => {
// Is path negated by any negating watch pattern?
if (matchesAnyNegatedPattern(path, [...globalPatternSet.watch.negated, ...localPatternSet.watch.negated])) {
// Short circut: negations in watch patterns take priority
// Short circuit: negations in watch patterns take priority
return false;
}

Expand Down Expand Up @@ -134,7 +134,7 @@ export const makeGlobalPatternSet = (initialContext: CodegenContext) => {
*
* In the `shouldRebuild` algorithm, any of these watch patterns will take
* precedence over documents or schemas patterns, and the documents and schemas
* patterns will be mixed into the pattern set of their respective gobal pattern
* patterns will be mixed into the pattern set of their respective global pattern
* set equivalents.
*/
export const makeLocalPatternSet = (conf: Types.ConfiguredOutput) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const assertBuildTriggers = async (
*
* This assertion helper will look for an **exact match** of each string
* in this array. Any relative globs should be specified relative from the
* `watchDirectory`, because this asertion helper will not attempt to convert
* `watchDirectory`, because this assertion helper will not attempt to convert
* them (unlike with {@link pathsWouldBeIgnoredByParcelWatcher}).
*
* For each string in this array:
Expand Down
2 changes: 1 addition & 1 deletion packages/graphql-codegen-cli/tests/watcher.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ describe('Watch targets', () => {
'./fuzz/some-other-bar/schemas/never-watch-schema.graphql', // excluded by local watchPattern group
//
// globally negated paths should be excluded even when a local pattern matches them
'./fuzz/alphabet/queries/exclude-watch-everywhere.graphql', // included in types-no-sigma.ts, but globaly excluded
'./fuzz/alphabet/queries/exclude-watch-everywhere.graphql', // included in types-no-sigma.ts, but globally excluded
'fuzz/global-beats-local/exclude-watch-everywhere.graphql',
'fuzz/global-beats-local/exclude-doc-everywhere.graphql',
'fuzz/global-beats-local/exclude-schema-everywhere.graphql',
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/other/visitor-plugin-common/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@

This is extending on `ResolversUnionTypes` implemented in https://github.com/dotansimha/graphql-code-generator/pull/9069

`resolversNonOptionalTypename` adds non-optional `__typename` to union members of `ResolversUnionTypes`, without affecting the union members' base intefaces.
`resolversNonOptionalTypename` adds non-optional `__typename` to union members of `ResolversUnionTypes`, without affecting the union members' base interfaces.

A common use case for non-optional `__typename` of union members is using it as the common field to work out the final schema type. This makes implementing the union's `__resolveType` very simple as we can use `__typename` to decide which union member the resolved object is. Without this, we have to check the existence of field/s on the incoming object which could be verbose.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@ export class BaseResolversVisitor<
const members = memberTypes
.map(type => {
const isTypeMapped = this.config.mappers[type.name];
// 1. If mapped without placehoder, just use it without doing extra checks
// 1. If mapped without placeholder, just use it without doing extra checks
if (isTypeMapped && !hasPlaceholder(isTypeMapped.type)) {
return { typename: type.name, typeValue: isTypeMapped.type };
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ export class BaseTypesVisitor<
...additionalConfig,
});

// Note: Missing directive mappers but not a problem since always overriden by implementors
// Note: Missing directive mappers but not a problem since always overridden by implementers
this._argumentsTransformer = new OperationVariablesToObject(this.scalars, this.convertName);
}

Expand Down
6 changes: 3 additions & 3 deletions packages/plugins/other/visitor-plugin-common/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export type NormalizedScalarsMap = {
};
/**
* Parsed scalars map - a mapping between GraphQL scalar name and the parsed mapper object,
* including all required information for generting code for that mapping.
* including all required information for generating code for that mapping.
*/
export type ParsedScalarsMap = {
[name: string]: {
Expand All @@ -45,7 +45,7 @@ export type EnumValuesMap<AdditionalProps = {}> =
| { [enumName: string]: string | ({ [key: string]: string | number } & AdditionalProps) };
export type ParsedEnumValuesMap = {
[enumName: string]: {
// If values are explictly set, this will include the mapped values
// If values are explicitly set, this will include the mapped values
mappedValues?: { [valueName: string]: string | number };
// The GraphQL enum name
typeIdentifier: string;
Expand All @@ -55,7 +55,7 @@ export type ParsedEnumValuesMap = {
sourceFile?: string;
// If the identifier is external (imported) - this will contain the imported expression (including alias), otherwise null
importIdentifier?: string;
// Is defualt import is used to import the enum
// Is default import is used to import the enum
isDefault?: boolean;
};
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('graphql-codegen typescript-graphql-document-nodes', () => {
validateTs(mergeOutputs([result]));
});

it('Should generate correctly for mutiple files', async () => {
it('Should generate correctly for multiple files', async () => {
const result = (await plugin(
null,
[
Expand Down
8 changes: 4 additions & 4 deletions packages/plugins/typescript/operations/tests/shared/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ export const schema = buildSchema(/* GraphQL */ `
userCreated: User
}

interface Notifiction {
interface Notification {
id: ID!
createdAt: String!
}

type TextNotification implements Notifiction {
type TextNotification implements Notification {
id: ID!
text: String!
createdAt: String!
}

type ImageNotification implements Notifiction {
type ImageNotification implements Notification {
id: ID!
imageUrl: String!
metadata: ImageMetadata!
Expand All @@ -64,7 +64,7 @@ export const schema = buildSchema(/* GraphQL */ `
type Query {
me: User
unionTest: MyUnion
notifications: [Notifiction!]!
notifications: [Notification!]!
mixedNotifications: [AnyNotification!]!
search(term: String!): [SearchResult!]!
dummy: String
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@ export type Q2Query = { search: Array<
await validate(content, config);
});

it('Should add __typename as non-optional when its explictly specified, even if skipTypename is true', async () => {
it('Should add __typename as non-optional when its explicitly specified, even if skipTypename is true', async () => {
const ast = parse(/* GraphQL */ `
query {
__typename
Expand Down Expand Up @@ -2109,7 +2109,7 @@ export type Q2Query = { search: Array<
const ast = parse(/* GraphQL */ `
query unionTest {
mixedNotifications {
... on Notifiction {
... on Notification {
id
}

Expand Down Expand Up @@ -2151,7 +2151,7 @@ export type Q2Query = { search: Array<
id
}

... on Notifiction {
... on Notification {
id
}

Expand Down Expand Up @@ -2196,7 +2196,7 @@ export type Q2Query = { search: Array<
}
}

fragment N on Notifiction {
fragment N on Notification {
id
}
`);
Expand Down Expand Up @@ -2226,7 +2226,7 @@ export type Q2Query = { search: Array<

it('Should support computing correct names for merged fragment union types', async () => {
const ast = parse(/* GraphQL */ `
fragment N on Notifiction {
fragment N on Notification {
id
... on TextNotification {
text
Expand Down Expand Up @@ -2350,7 +2350,7 @@ export type Q2Query = { search: Array<
}
}

fragment N on Notifiction {
fragment N on Notification {
id
}
`);
Expand All @@ -2369,7 +2369,7 @@ export type Q2Query = { search: Array<

it('Should support computing correct names for merged fragment union types with skipTypename', async () => {
const ast = parse(/* GraphQL */ `
fragment N on Notifiction {
fragment N on Notification {
id
... on TextNotification {
text
Expand Down Expand Up @@ -2399,7 +2399,7 @@ export type Q2Query = { search: Array<
}
}

fragment N on Notifiction {
fragment N on Notification {
id
}
`);
Expand Down Expand Up @@ -4559,7 +4559,7 @@ export type Q2Query = { search: Array<
);
});

it('#5422 - Error when interface doesnt have implemeting types', async () => {
it('#5422 - Error when interface doesnt have implementing types', async () => {
const testSchema = buildSchema(/* GraphQL */ `
interface A {
a: String!
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/typescript/resolvers/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@

This is extending on `ResolversUnionTypes` implemented in https://github.com/dotansimha/graphql-code-generator/pull/9069

`resolversNonOptionalTypename` adds non-optional `__typename` to union members of `ResolversUnionTypes`, without affecting the union members' base intefaces.
`resolversNonOptionalTypename` adds non-optional `__typename` to union members of `ResolversUnionTypes`, without affecting the union members' base interfaces.

A common use case for non-optional `__typename` of union members is using it as the common field to work out the final schema type. This makes implementing the union's `__resolveType` very simple as we can use `__typename` to decide which union member the resolved object is. Without this, we have to check the existence of field/s on the incoming object which could be verbose.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ __isTypeOf?: IsTypeOfResolverFn<ParentType, ContextType>;
content: `
const resolvers: QueryResolvers = {
something: (root, args, context, info) => {
return args.arg; // This should work becuase "args.arg" is now forced
return args.arg; // This should work because "args.arg" is now forced
}
};`,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ describe('TypeScript', () => {
};`);
});

it('Should work with inteface and inteface fields', async () => {
it('Should work with interface and interface fields', async () => {
const schema = buildSchema(/* GraphQL */ `
interface Node {
"the id"
Expand Down Expand Up @@ -468,7 +468,7 @@ describe('TypeScript', () => {
};`);
});

it('Should work with inteface and inteface fields', async () => {
it('Should work with interface and interface fields', async () => {
const schema = buildSchema(/* GraphQL */ `
interface Node {
"the id"
Expand Down Expand Up @@ -1828,7 +1828,7 @@ describe('TypeScript', () => {
validateTs(result);
});

it('Should extend mutiple interfaces', async () => {
it('Should extend multiple interfaces', async () => {
const schema = buildSchema(/* GraphQL */ `
interface MyInterface1 {
id: ID!
Expand Down
4 changes: 2 additions & 2 deletions packages/presets/client/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@

### Minor Changes

- [#10136](https://github.com/dotansimha/graphql-code-generator/pull/10136) [`3fd4486`](https://github.com/dotansimha/graphql-code-generator/commit/3fd4486a548c27099377c7bd696a22d1638227f4) Thanks [@wxt2005](https://github.com/wxt2005)! - foward skipTypeNameForRoot to client-preset
- [#10136](https://github.com/dotansimha/graphql-code-generator/pull/10136) [`3fd4486`](https://github.com/dotansimha/graphql-code-generator/commit/3fd4486a548c27099377c7bd696a22d1638227f4) Thanks [@wxt2005](https://github.com/wxt2005)! - forward skipTypeNameForRoot to client-preset

### Patch Changes

Expand Down Expand Up @@ -353,7 +353,7 @@

### Minor Changes

- [#9562](https://github.com/dotansimha/graphql-code-generator/pull/9562) [`5beee9794`](https://github.com/dotansimha/graphql-code-generator/commit/5beee9794de208fed17e516a259535f56d626c9d) Thanks [@n1ru4l](https://github.com/n1ru4l)! - Add the `addTypenameSelectionDocumentTransform` for automatically adding `__typename` selections to all objct type selection sets.
- [#9562](https://github.com/dotansimha/graphql-code-generator/pull/9562) [`5beee9794`](https://github.com/dotansimha/graphql-code-generator/commit/5beee9794de208fed17e516a259535f56d626c9d) Thanks [@n1ru4l](https://github.com/n1ru4l)! - Add the `addTypenameSelectionDocumentTransform` for automatically adding `__typename` selections to all object type selection sets.

This is useful for GraphQL Clients such as Apollo Client or urql that need typename information for their cache to function.

Expand Down
2 changes: 1 addition & 1 deletion packages/presets/graphql-modules/tests/builder.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ test('should use and export resolver signatures of types defined or extended in
`);
});

test('should not generate resolver signatures of types that are not defined or extened by a module', () => {
test('should not generate resolver signatures of types that are not defined or extended by a module', () => {
const output = buildModule('test', testDoc, {
importPath: '../types',
importNamespace: 'core',
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/graphql-codegen-testing/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### Major Changes

- [#10218](https://github.com/dotansimha/graphql-code-generator/pull/10218) [`140298a`](https://github.com/dotansimha/graphql-code-generator/commit/140298a33b257a0b7958e361971b5bc97bbc01c2) Thanks [@eddeee888](https://github.com/eddeee888)! - Bump depdendencies major versions:
- [#10218](https://github.com/dotansimha/graphql-code-generator/pull/10218) [`140298a`](https://github.com/dotansimha/graphql-code-generator/commit/140298a33b257a0b7958e361971b5bc97bbc01c2) Thanks [@eddeee888](https://github.com/eddeee888)! - Bump dependencies major versions:

- nock v14

Expand Down
2 changes: 1 addition & 1 deletion packages/utils/plugins-helpers/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@

### Patch Changes

- [`307a5d350`](https://github.com/dotansimha/graphql-code-generator/commit/307a5d350643dd065d228b04ef3b4bd70cac0e81) Thanks [@saihaj](https://github.com/saihaj)! - Something went wrong in old relesae so this will ensure we have a good bump on all packages
- [`307a5d350`](https://github.com/dotansimha/graphql-code-generator/commit/307a5d350643dd065d228b04ef3b4bd70cac0e81) Thanks [@saihaj](https://github.com/saihaj)! - Something went wrong in old release so this will ensure we have a good bump on all packages

## 3.1.0

Expand Down
2 changes: 1 addition & 1 deletion packages/utils/plugins-helpers/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ export namespace Types {
*/
hooks?: Partial<LifecycleHooksDefinition>;
/**
* @description Alows to raise errors if any matched files are not valid GraphQL. Default: false.
* @description Allows to raise errors if any matched files are not valid GraphQL. Default: false.
*/
noSilentErrors?: boolean;
/**
Expand Down
8 changes: 4 additions & 4 deletions website/public/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"description": "Specifies scripts to run when events are happening in the codegen core.\nHooks defined on that level will effect all output files.\n\nFor more details: https://graphql-code-generator.com/docs/config-reference/lifecycle-hooks"
},
"noSilentErrors": {
"description": "Alows to raise errors if any matched files are not valid GraphQL. Default: false.",
"description": "Allows to raise errors if any matched files are not valid GraphQL. Default: false.",
"type": "boolean"
},
"allowPartialOutputs": {
Expand Down Expand Up @@ -335,7 +335,7 @@
}
},
"RawGenericSdkPluginConfig": {
"description": "This plugin generate a generic SDK (without any Requester implemented), allow you to easily customize the way you fetch your data, without loosing the strongly-typed integration.",
"description": "This plugin generate a generic SDK (without any Requester implemented), allow you to easily customize the way you fetch your data, without losing the strongly-typed integration.",
"type": "object",
"properties": {
"usingObservableFrom": {
Expand Down Expand Up @@ -4760,11 +4760,11 @@
},
{
"const": "typescript-generic-sdk",
"description": "This plugin generate a generic SDK (without any Requester implemented), allow you to easily customize the way you fetch your data, without loosing the strongly-typed integration.\n\nFor more details and documentation: https://the-guild.dev/graphql/codegen/docs/plugins/typescript-generic-sdk\n\n=> Make sure to include \"@graphql-codegen/typescript-generic-sdk\" in your package.json file and install your dependencies.\n\n"
"description": "This plugin generate a generic SDK (without any Requester implemented), allow you to easily customize the way you fetch your data, without losing the strongly-typed integration.\n\nFor more details and documentation: https://the-guild.dev/graphql/codegen/docs/plugins/typescript-generic-sdk\n\n=> Make sure to include \"@graphql-codegen/typescript-generic-sdk\" in your package.json file and install your dependencies.\n\n"
},
{
"const": "@graphql-codegen/typescript-generic-sdk",
"description": "This plugin generate a generic SDK (without any Requester implemented), allow you to easily customize the way you fetch your data, without loosing the strongly-typed integration.\n\nFor more details and documentation: https://the-guild.dev/graphql/codegen/docs/plugins/typescript-generic-sdk\n\n=> Make sure to include \"@graphql-codegen/typescript-generic-sdk\" in your package.json file and install your dependencies.\n\n"
"description": "This plugin generate a generic SDK (without any Requester implemented), allow you to easily customize the way you fetch your data, without losing the strongly-typed integration.\n\nFor more details and documentation: https://the-guild.dev/graphql/codegen/docs/plugins/typescript-generic-sdk\n\n=> Make sure to include \"@graphql-codegen/typescript-generic-sdk\" in your package.json file and install your dependencies.\n\n"
},
{
"const": "typescript-apollo-client-helpers",
Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/docs/guides/flutter-freezed.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ class SearchResult with _$SearchResult { // @6
### Identifying the building blocks

The generated output consists of several blocks enabling you to specify a configuration
targetting a specific block.
targeting a specific block.

> All `APPLIES_ON_*` values are exported from the `plugin-config` module of this package.

Expand Down