@gql.tada/internal
Advanced tools
Comparing version 0.3.0-canary-baf20632e4ea2bf02987848b116d4d9ab5d2174d to 0.3.0-canary-fa1c8daa4b931ae5fb88a8733eb78189c5c8247c
# @gql.tada/internal | ||
## 0.3.0-canary-baf20632e4ea2bf02987848b116d4d9ab5d2174d | ||
## 0.3.0-canary-fa1c8daa4b931ae5fb88a8733eb78189c5c8247c | ||
@@ -5,0 +5,0 @@ ### Minor Changes |
@@ -25,7 +25,25 @@ import { IntrospectionQuery, GraphQLSchema } from 'graphql'; | ||
} | ||
interface BaseLoadConfig { | ||
rootPath?: string; | ||
fetchInterval?: number; | ||
assumeValid?: boolean; | ||
} | ||
type SingleSchemaInput = { | ||
name?: string; | ||
schema: SchemaOrigin; | ||
tadaOutputLocation?: string; | ||
tadaTurboLocation?: string; | ||
tadaPersistedLocation?: string; | ||
}; | ||
type MultiSchemaInput = { | ||
schemas?: SingleSchemaInput[]; | ||
}; | ||
interface SchemaRef<Result = SchemaLoaderResult | null> { | ||
/** Starts automatically updating the ref */ | ||
autoupdate(): () => void; | ||
autoupdate( | ||
config: BaseLoadConfig, | ||
onUpdate: (ref: SchemaRef<Result>, input: SingleSchemaInput) => void | ||
): () => void; | ||
/** Loads the initial result for the schema */ | ||
load(): Promise<SchemaRef<SchemaLoaderResult>>; | ||
load(config: BaseLoadConfig): Promise<SchemaRef<SchemaLoaderResult>>; | ||
current: Result; | ||
@@ -63,7 +81,2 @@ multi: { | ||
} | null; | ||
interface BaseLoadConfig { | ||
rootPath?: string; | ||
fetchInterval?: number; | ||
assumeValid?: boolean; | ||
} | ||
interface LoadConfig extends BaseLoadConfig { | ||
@@ -73,15 +86,4 @@ origin: SchemaOrigin; | ||
declare function load(config: LoadConfig): SchemaLoader; | ||
type SingleSchemaInput = { | ||
name?: string; | ||
schema: SchemaOrigin; | ||
tadaOutputLocation?: string; | ||
tadaTurboLocation?: string; | ||
tadaPersistedLocation?: string; | ||
}; | ||
type MultiSchemaInput = { | ||
schemas?: SingleSchemaInput[]; | ||
}; | ||
declare function loadRef( | ||
input: SingleSchemaInput | MultiSchemaInput | (SingleSchemaInput & MultiSchemaInput), | ||
config?: BaseLoadConfig | ||
input: SingleSchemaInput | MultiSchemaInput | (SingleSchemaInput & MultiSchemaInput) | ||
): SchemaRef; | ||
@@ -88,0 +90,0 @@ |
{ | ||
"name": "@gql.tada/internal", | ||
"version": "0.3.0-canary-baf20632e4ea2bf02987848b116d4d9ab5d2174d", | ||
"version": "0.3.0-canary-fa1c8daa4b931ae5fb88a8733eb78189c5c8247c", | ||
"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
376204
6225