@graphql-codegen/schema-ast 2.4.0 → 2.4.2-alpha-bc33c031d.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -39,7 +39,7 @@ export interface SchemaASTConfig {
39
39
  */
40
40
  includeIntrospectionTypes?: boolean;
41
41
  /**
42
- * @description Set to true in order to print description as comments (using # instead of """)
42
+ * @description Set to true in order to print description as comments (using `#` instead of `"""`)
43
43
  * @default false
44
44
  *
45
45
  * @exampleMarkdown
@@ -55,8 +55,8 @@ export interface SchemaASTConfig {
55
55
  */
56
56
  commentDescriptions?: boolean;
57
57
  /**
58
- * @description Set to true in order get the schema lexicographically sorted before printed.
59
- * @default false
58
+ * @description Set to false to disable sorting
59
+ * @default true
60
60
  */
61
61
  sort?: boolean;
62
62
  federation?: boolean;
package/index.js CHANGED
@@ -6,7 +6,7 @@ const graphql = require('graphql');
6
6
  const pluginHelpers = require('@graphql-codegen/plugin-helpers');
7
7
  const path = require('path');
8
8
 
9
- const plugin = async (schema, _documents, { commentDescriptions = false, includeDirectives = false, includeIntrospectionTypes = false, sort = false, federation }) => {
9
+ const plugin = async (schema, _documents, { commentDescriptions = false, includeDirectives = false, includeIntrospectionTypes = false, sort = false, federation, }) => {
10
10
  const transformedSchemaAndAst = transformSchemaAST(schema, { sort, federation, includeIntrospectionTypes });
11
11
  return [
12
12
  includeIntrospectionTypes ? graphql.printIntrospectionSchema(transformedSchemaAndAst.schema) : null,
package/index.mjs CHANGED
@@ -2,7 +2,7 @@ import { printIntrospectionSchema, print, printSchema, parse, extendSchema, visi
2
2
  import { removeFederation, getCachedDocumentNodeFromSchema } from '@graphql-codegen/plugin-helpers';
3
3
  import { extname } from 'path';
4
4
 
5
- const plugin = async (schema, _documents, { commentDescriptions = false, includeDirectives = false, includeIntrospectionTypes = false, sort = false, federation }) => {
5
+ const plugin = async (schema, _documents, { commentDescriptions = false, includeDirectives = false, includeIntrospectionTypes = false, sort = false, federation, }) => {
6
6
  const transformedSchemaAndAst = transformSchemaAST(schema, { sort, federation, includeIntrospectionTypes });
7
7
  return [
8
8
  includeIntrospectionTypes ? printIntrospectionSchema(transformedSchemaAndAst.schema) : null,
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@graphql-codegen/schema-ast",
3
- "version": "2.4.0",
3
+ "version": "2.4.2-alpha-bc33c031d.0",
4
4
  "description": "GraphQL Code Generator plugin for generating a .graphql file from a given schema",
5
5
  "peerDependencies": {
6
6
  "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 || ^16.0.0"
7
7
  },
8
8
  "dependencies": {
9
- "@graphql-codegen/plugin-helpers": "^2.3.0",
9
+ "@graphql-codegen/plugin-helpers": "2.3.3-alpha-bc33c031d.0",
10
10
  "@graphql-tools/utils": "^8.1.1",
11
11
  "tslib": "~2.3.0"
12
12
  },
@@ -23,6 +23,7 @@
23
23
  "definition": "index.d.ts"
24
24
  },
25
25
  "exports": {
26
+ "./package.json": "./package.json",
26
27
  ".": {
27
28
  "require": "./index.js",
28
29
  "import": "./index.mjs"