@gql.tada/internal
Advanced tools
Comparing version 0.1.2-canary-5c645c6115aa1525436715440c451105ff494e20 to 0.1.2-canary-6d041157396021d735550f8a9c60bbdf79e8e5ef
# @gql.tada/internal | ||
## 0.1.2-canary-5c645c6115aa1525436715440c451105ff494e20 | ||
## 0.1.2-canary-6d041157396021d735550f8a9c60bbdf79e8e5ef | ||
@@ -9,2 +9,4 @@ ### Patch Changes | ||
Submitted by [@kitten](https://github.com/kitten) (See [#163](https://github.com/0no-co/gql.tada/pull/163)) | ||
- Update internal loader to merge them into one and incorporate `SchemaOrigin` parsing | ||
Submitted by [@kitten](https://github.com/kitten) (See [#165](https://github.com/0no-co/gql.tada/pull/165)) | ||
@@ -11,0 +13,0 @@ ## 0.1.1 |
@@ -38,7 +38,21 @@ import * as typescript from 'typescript'; | ||
interface SchemaLoaderResult { | ||
introspection: IntrospectionQuery; | ||
schema: GraphQLSchema; | ||
} | ||
type OnSchemaUpdate = (result: SchemaLoaderResult) => void; | ||
interface SchemaLoader { | ||
load(reload?: boolean): Promise<SchemaLoaderResult | null>; | ||
notifyOnUpdate(onUpdate: OnSchemaUpdate): () => void; | ||
/** @internal */ | ||
loadIntrospection(): Promise<IntrospectionQuery | null>; | ||
/** @internal */ | ||
loadSchema(): Promise<GraphQLSchema | null>; | ||
notifyOnUpdate(onUpdate: () => void): () => void; | ||
} | ||
type SchemaOrigin = | ||
| string | ||
| { | ||
url: string; | ||
headers?: HeadersInit; | ||
}; | ||
@@ -58,2 +72,10 @@ interface LoadFromSDLConfig { | ||
interface LoadConfig { | ||
origin: SchemaOrigin; | ||
rootPath?: string; | ||
fetchInterval?: number; | ||
assumeValid?: boolean; | ||
} | ||
declare function load(config: LoadConfig): SchemaLoader; | ||
declare function preprocessIntrospection({ __schema: schema }: IntrospectionQuery): string; | ||
@@ -74,3 +96,7 @@ | ||
export { | ||
type LoadConfig, | ||
type OnSchemaUpdate, | ||
type SchemaLoader, | ||
type SchemaLoaderResult, | ||
type SchemaOrigin, | ||
type VirtualCompilerHost, | ||
@@ -81,2 +107,3 @@ createProgram, | ||
importModule, | ||
load, | ||
loadFromSDL, | ||
@@ -83,0 +110,0 @@ loadFromURL, |
{ | ||
"name": "@gql.tada/internal", | ||
"version": "0.1.2-canary-5c645c6115aa1525436715440c451105ff494e20", | ||
"version": "0.1.2-canary-6d041157396021d735550f8a9c60bbdf79e8e5ef", | ||
"public": true, | ||
@@ -5,0 +5,0 @@ "description": "Internal logic for gql.tada’s CLI tool and GraphQLSP.", |
Sorry, the diff of this file is too big to display
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
599052
8748