Skip to content

Commit

Permalink
Upgrade @graphql-toos/ packages, fixes for versioning issues (#4553)
Browse files Browse the repository at this point in the history
* versioning fixes, docs fixes

* added changesets

* fix changesets file
  • Loading branch information
dotansimha committed Aug 11, 2020
1 parent 816ff1e commit 1d7c643
Show file tree
Hide file tree
Showing 33 changed files with 953 additions and 364 deletions.
47 changes: 47 additions & 0 deletions .changeset/forty-weeks-kneel.md
@@ -0,0 +1,47 @@
---
'@graphql-codegen/cli': patch
'@graphql-codegen/core': patch
'@graphql-codegen/flow-resolvers': patch
'@graphql-codegen/schema-ast': patch
'@graphql-codegen/visitor-plugin-common': patch
'@graphql-codegen/typescript-mongodb': patch
'@graphql-codegen/typescript-resolvers': patch
'@graphql-codegen/plugin-helpers': patch
'@graphql-cli/codegen': patch
'@graphql-codegen/c-sharp': patch
'@graphql-codegen/c-sharp-operations': patch
'@graphql-codegen/flow': patch
'@graphql-codegen/flow-operations': patch
'@graphql-codegen/java-apollo-android': patch
'@graphql-codegen/java-common': patch
'@graphql-codegen/java': patch
'@graphql-codegen/kotlin': patch
'@graphql-codegen/java-resolvers': patch
'@graphql-codegen/add': patch
'@graphql-codegen/fragment-matcher': patch
'@graphql-codegen/introspection': patch
'@graphql-codegen/jsdoc': patch
'@graphql-codegen/time': patch
'@graphql-codegen/typescript-apollo-angular': patch
'@graphql-codegen/typescript-compatibility': patch
'@graphql-codegen/typescript-document-nodes': patch
'@graphql-codegen/typescript-generic-sdk': patch
'@graphql-codegen/typescript-graphql-files-modules': patch
'@graphql-codegen/typescript-graphql-request': patch
'@graphql-codegen/named-operations-object': patch
'@graphql-codegen/typescript-oclif': patch
'@graphql-codegen/typescript-operations': patch
'@graphql-codegen/typescript-react-apollo': patch
'@graphql-codegen/typescript-react-offix': patch
'@graphql-codegen/typescript-stencil-apollo': patch
'@graphql-codegen/typescript-type-graphql': patch
'@graphql-codegen/typed-document-node': patch
'@graphql-codegen/typescript': patch
'@graphql-codegen/typescript-urql': patch
'@graphql-codegen/typescript-vue-apollo': patch
'@graphql-codegen/import-types-preset': patch
'@graphql-codegen/near-operation-file-preset': patch
'@graphql-codegen/config-schema': patch
---

Bump all packages to allow "^" in deps and fix compatibility issues
47 changes: 47 additions & 0 deletions .changeset/funny-scissors-sip.md
@@ -0,0 +1,47 @@
---
'@graphql-codegen/cli': patch
'@graphql-codegen/core': patch
'@graphql-codegen/flow-resolvers': patch
'@graphql-codegen/schema-ast': patch
'@graphql-codegen/visitor-plugin-common': patch
'@graphql-codegen/typescript-mongodb': patch
'@graphql-codegen/typescript-resolvers': patch
'@graphql-codegen/plugin-helpers': patch
'@graphql-cli/codegen': patch
'@graphql-codegen/c-sharp': patch
'@graphql-codegen/c-sharp-operations': patch
'@graphql-codegen/flow': patch
'@graphql-codegen/flow-operations': patch
'@graphql-codegen/java-apollo-android': patch
'@graphql-codegen/java-common': patch
'@graphql-codegen/java': patch
'@graphql-codegen/kotlin': patch
'@graphql-codegen/java-resolvers': patch
'@graphql-codegen/add': patch
'@graphql-codegen/fragment-matcher': patch
'@graphql-codegen/introspection': patch
'@graphql-codegen/jsdoc': patch
'@graphql-codegen/time': patch
'@graphql-codegen/typescript-apollo-angular': patch
'@graphql-codegen/typescript-compatibility': patch
'@graphql-codegen/typescript-document-nodes': patch
'@graphql-codegen/typescript-generic-sdk': patch
'@graphql-codegen/typescript-graphql-files-modules': patch
'@graphql-codegen/typescript-graphql-request': patch
'@graphql-codegen/named-operations-object': patch
'@graphql-codegen/typescript-oclif': patch
'@graphql-codegen/typescript-operations': patch
'@graphql-codegen/typescript-react-apollo': patch
'@graphql-codegen/typescript-react-offix': patch
'@graphql-codegen/typescript-stencil-apollo': patch
'@graphql-codegen/typescript-type-graphql': patch
'@graphql-codegen/typed-document-node': patch
'@graphql-codegen/typescript': patch
'@graphql-codegen/typescript-urql': patch
'@graphql-codegen/typescript-vue-apollo': patch
'@graphql-codegen/import-types-preset': patch
'@graphql-codegen/near-operation-file-preset': patch
'@graphql-codegen/config-schema': patch
---

Bump versions of @graphql-tools/ packages to fix issues with loading schemas and SDL comments
20 changes: 10 additions & 10 deletions package.json
Expand Up @@ -45,16 +45,16 @@
"@apollo/client": "3.1.2",
"@babel/preset-typescript": "7.10.4",
"@changesets/cli": "2.9.2",
"@graphql-tools/apollo-engine-loader": "6.0.15",
"@graphql-tools/code-file-loader": "6.0.15",
"@graphql-tools/git-loader": "6.0.15",
"@graphql-tools/github-loader": "6.0.15",
"@graphql-tools/graphql-file-loader": "6.0.15",
"@graphql-tools/json-file-loader": "6.0.15",
"@graphql-tools/load": "6.0.15",
"@graphql-tools/prisma-loader": "6.0.15",
"@graphql-tools/url-loader": "6.0.15",
"@graphql-tools/utils": "6.0.15",
"@graphql-tools/apollo-engine-loader": "6.0.18",
"@graphql-tools/code-file-loader": "6.0.18",
"@graphql-tools/git-loader": "6.0.18",
"@graphql-tools/github-loader": "6.0.18",
"@graphql-tools/graphql-file-loader": "6.0.18",
"@graphql-tools/json-file-loader": "6.0.18",
"@graphql-tools/load": "6.0.18",
"@graphql-tools/prisma-loader": "6.0.18",
"@graphql-tools/url-loader": "6.0.18",
"@graphql-tools/utils": "6.0.18",
"@graphql-typed-document-node/core": "3.0.0",
"@types/common-tags": "1.8.0",
"@types/glob": "7.1.3",
Expand Down
20 changes: 10 additions & 10 deletions packages/graphql-codegen-cli/package.json
Expand Up @@ -42,16 +42,16 @@
"dependencies": {
"@graphql-codegen/core": "1.17.7",
"@graphql-codegen/plugin-helpers": "^1.17.7",
"@graphql-tools/apollo-engine-loader": "^6.0.0",
"@graphql-tools/code-file-loader": "^6.0.0",
"@graphql-tools/git-loader": "^6.0.0",
"@graphql-tools/github-loader": "^6.0.0",
"@graphql-tools/graphql-file-loader": "^6.0.0",
"@graphql-tools/json-file-loader": "^6.0.0",
"@graphql-tools/load": "^6.0.0",
"@graphql-tools/prisma-loader": "^6.0.0",
"@graphql-tools/url-loader": "^6.0.0",
"@graphql-tools/utils": "^6.0.0",
"@graphql-tools/apollo-engine-loader": "^6.0.18",
"@graphql-tools/code-file-loader": "^6.0.18",
"@graphql-tools/git-loader": "^6.0.18",
"@graphql-tools/github-loader": "^6.0.18",
"@graphql-tools/graphql-file-loader": "^6.0.18",
"@graphql-tools/json-file-loader": "^6.0.18",
"@graphql-tools/load": "^6.0.18",
"@graphql-tools/prisma-loader": "^6.0.18",
"@graphql-tools/url-loader": "^6.0.18",
"@graphql-tools/utils": "^6.0.18",
"ansi-escapes": "^4.3.1",
"camel-case": "^4.1.1",
"chalk": "^4.1.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/graphql-codegen-core/package.json
Expand Up @@ -39,8 +39,8 @@
},
"dependencies": {
"@graphql-codegen/plugin-helpers": "^1.17.7",
"@graphql-tools/merge": "^6.0.0",
"@graphql-tools/utils": "^6.0.0",
"@graphql-tools/merge": "^6.0.18",
"@graphql-tools/utils": "^6.0.18",
"tslib": "~2.0.0"
},
"main": "dist/index.cjs.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/flow/resolvers/package.json
Expand Up @@ -17,7 +17,7 @@
"@graphql-codegen/flow": "^1.17.7",
"@graphql-codegen/plugin-helpers": "^1.17.7",
"@graphql-codegen/visitor-plugin-common": "^1.17.7",
"@graphql-tools/utils": "^6.0.0",
"@graphql-tools/utils": "^6.0.18",
"auto-bind": "~4.0.0",
"tslib": "~2.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/other/schema-ast/package.json
Expand Up @@ -15,7 +15,7 @@
},
"dependencies": {
"@graphql-codegen/plugin-helpers": "^1.17.7",
"@graphql-tools/utils": "^6.0.0",
"@graphql-tools/utils": "^6.0.18",
"tslib": "~2.0.0"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/other/visitor-plugin-common/package.json
Expand Up @@ -14,7 +14,7 @@
},
"dependencies": {
"@graphql-codegen/plugin-helpers": "^1.17.7",
"@graphql-tools/relay-operation-optimizer": "6.0.15",
"@graphql-tools/relay-operation-optimizer": "^6.0.18",
"array.prototype.flatmap": "^1.2.3",
"auto-bind": "~4.0.0",
"dependency-graph": "^0.9.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/typescript/mongodb/package.json
Expand Up @@ -17,7 +17,7 @@
"@graphql-codegen/plugin-helpers": "^1.17.7",
"@graphql-codegen/typescript": "^1.17.7",
"@graphql-codegen/visitor-plugin-common": "^1.17.7",
"@graphql-tools/utils": "^6.0.0",
"@graphql-tools/utils": "^6.0.18",
"auto-bind": "~4.0.0",
"lodash": "~4.17.15",
"tslib": "~2.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/typescript/resolvers/package.json
Expand Up @@ -17,7 +17,7 @@
"@graphql-codegen/plugin-helpers": "^1.17.7",
"@graphql-codegen/typescript": "^1.17.7",
"@graphql-codegen/visitor-plugin-common": "^1.17.7",
"@graphql-tools/utils": "^6.0.0",
"@graphql-tools/utils": "^6.0.18",
"auto-bind": "~4.0.0",
"tslib": "~2.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/plugins-helpers/package.json
Expand Up @@ -17,7 +17,7 @@
"graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0"
},
"dependencies": {
"@graphql-tools/utils": "^6.0.0",
"@graphql-tools/utils": "^6.0.18",
"camel-case": "4.1.1",
"common-tags": "1.8.0",
"constant-case": "3.0.3",
Expand Down
94 changes: 92 additions & 2 deletions packages/utils/plugins-helpers/src/types.ts
Expand Up @@ -89,15 +89,105 @@ export namespace Types {
[url: string]: UrlSchemaOptions;
}

export type LocalSchemaPath = string;
/**
* @additionalProperties false
* @description Loads a schema a local file or files, with customized options for parsing/loading.
*/
export interface LocalSchemaPathOptions {
/**
* @description Skips checks for graphql-import syntax and loads the file as-is, without imports support.
* @default true
*/
skipGraphQLImport?: boolean;

/**
* @description Converts all GraphQL comments (`#` sign) to descriptions during the parse phase, to make it available
* for plugins later.
* @default false
*/
commentDescriptions?: boolean;

/**
* When building a schema from a GraphQL service's introspection result, it
* might be safe to assume the schema is valid. Set to true to assume the
* produced schema is valid.
*
* @default false
*/
assumeValid?: boolean;

/**
* Set to true to assume the SDL is valid.
*
* @default false
*/
assumeValidSDL?: boolean;

/**
* By default, the parser creates AST nodes that know the location
* in the source that they correspond to. This configuration flag
* disables that behavior for performance or testing.
*
* @default false
*/
noLocation?: boolean;

/**
* If enabled, the parser will parse empty fields sets in the Schema
* Definition Language. Otherwise, the parser will follow the current
* specification.
*
* This option is provided to ease adoption of the final SDL specification
* and will be removed in v16.
*
* @default false
*/
allowLegacySDLEmptyFields?: boolean;

/**
* If enabled, the parser will parse implemented interfaces with no `&`
* character between each interface. Otherwise, the parser will follow the
* current specification.
*
* This option is provided to ease adoption of the final SDL specification
* and will be removed in v16.
*
* @default false
*/
allowLegacySDLImplementsInterfaces?: boolean;

/**
* EXPERIMENTAL:
*
* If enabled, the parser will understand and parse variable definitions
* contained in a fragment definition. They'll be represented in the
* `variableDefinitions` field of the FragmentDefinitionNode.
*
* The syntax is identical to normal, query-defined variables. For example:
*
* fragment A($var: Boolean = false) on T {
* ...
* }
*
* Note: this feature is experimental and may change or be removed in the
* future.
*
* @default false
*/
experimentalFragmentVariables?: boolean;
}
export interface LocalSchemaPathWithOptions {
[globPath: string]: LocalSchemaPathOptions;
}

export type SchemaGlobPath = string;
/**
* @description A URL to your GraphQL endpoint, a local path to `.graphql` file, a glob pattern to your GraphQL schema files, or a JavaScript file that exports the schema to generate code from. This can also be an array which specifies multiple schemas to generate code from. You can read more about the supported formats [here](schema-field#available-formats).
*/
export type Schema =
| string
| UrlSchemaWithOptions
| LocalSchemaPath
| LocalSchemaPathWithOptions
| SchemaGlobPath
| SchemaWithLoader
| SchemaFromCodeFile;
Expand Down
14 changes: 14 additions & 0 deletions website/docs/generated-config/c-sharp-operations.md
Expand Up @@ -310,6 +310,20 @@ config:
typesPrefix: I
```

### `typesSuffix`

type: `string`
default: ``

Suffixes all the generated types.

#### Usage Examples

```yml
config:
typesSuffix: I
```

### `skipTypename`

type: `boolean`
Expand Down
14 changes: 14 additions & 0 deletions website/docs/generated-config/c-sharp.md
Expand Up @@ -156,6 +156,20 @@ config:
typesPrefix: I
```

### `typesSuffix`

type: `string`
default: ``

Suffixes all the generated types.

#### Usage Examples

```yml
config:
typesSuffix: I
```

### `skipTypename`

type: `boolean`
Expand Down
14 changes: 14 additions & 0 deletions website/docs/generated-config/java-apollo-android.md
Expand Up @@ -146,6 +146,20 @@ config:
typesPrefix: I
```

### `typesSuffix`

type: `string`
default: ``

Suffixes all the generated types.

#### Usage Examples

```yml
config:
typesSuffix: I
```

### `skipTypename`

type: `boolean`
Expand Down

0 comments on commit 1d7c643

Please sign in to comment.