@pothos/core
Advanced tools
Comparing version 3.15.0 to 3.16.0
# Change Log | ||
## 3.16.0 | ||
### Minor Changes | ||
- 679baa83: Add option to disable schema sorting | ||
## 3.15.0 | ||
@@ -4,0 +10,0 @@ |
@@ -16,2 +16,3 @@ import type { GraphQLDirective } from 'graphql'; | ||
extensions?: Record<string, unknown>; | ||
sortSchema?: boolean; | ||
} | ||
@@ -18,0 +19,0 @@ interface Plugins<Types extends SchemaTypes> { |
@@ -319,3 +319,4 @@ import { GraphQLBoolean, GraphQLFloat, GraphQLID, GraphQLInt, GraphQLSchema, GraphQLString, lexicographicSortSchema } from 'graphql'; | ||
}); | ||
return lexicographicSortSchema(buildCache.plugin.afterBuild(schema)); | ||
const processedSchema = buildCache.plugin.afterBuild(schema); | ||
return options.sortSchema === false ? processedSchema : lexicographicSortSchema(processedSchema); | ||
} | ||
@@ -322,0 +323,0 @@ constructor(options) { |
@@ -371,3 +371,4 @@ "use strict"; | ||
}); | ||
return (0, _graphql.lexicographicSortSchema)(buildCache.plugin.afterBuild(schema)); | ||
const processedSchema = buildCache.plugin.afterBuild(schema); | ||
return options.sortSchema === false ? processedSchema : (0, _graphql.lexicographicSortSchema)(processedSchema); | ||
} | ||
@@ -374,0 +375,0 @@ constructor(options){ |
{ | ||
"name": "@pothos/core", | ||
"version": "3.15.0", | ||
"version": "3.16.0", | ||
"description": "Pothos (formerly GiraphQL) is a plugin based schema builder for creating code-first GraphQL schemas in typescript", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
@@ -570,4 +570,8 @@ import { | ||
return lexicographicSortSchema(buildCache.plugin.afterBuild(schema)); | ||
const processedSchema = buildCache.plugin.afterBuild(schema); | ||
return options.sortSchema === false | ||
? processedSchema | ||
: lexicographicSortSchema(processedSchema); | ||
} | ||
} |
@@ -25,2 +25,3 @@ /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-empty-interface */ | ||
extensions?: Record<string, unknown>; | ||
sortSchema?: boolean; | ||
} | ||
@@ -27,0 +28,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
856388
11911