@gql.tada/internal
Advanced tools
Comparing version 0.1.1 to 0.1.2-canary-5c645c6115aa1525436715440c451105ff494e20
# @gql.tada/internal | ||
## 0.1.2-canary-5c645c6115aa1525436715440c451105ff494e20 | ||
### Patch Changes | ||
- Add `loadFromSDL` and `loadFromURL` schema loader utilities | ||
Submitted by [@kitten](https://github.com/kitten) (See [#163](https://github.com/0no-co/gql.tada/pull/163)) | ||
## 0.1.1 | ||
@@ -4,0 +11,0 @@ |
import * as typescript from 'typescript'; | ||
import { CompilerHost, ScriptTarget, CreateSourceFileOptions, ResolvedModule } from 'typescript'; | ||
/*!@ts-ignore*/ | ||
import { IntrospectionQuery } from 'graphql'; | ||
import { IntrospectionQuery, GraphQLSchema } from 'graphql'; | ||
@@ -39,2 +38,21 @@ declare function normalize(filename: string): string; | ||
interface SchemaLoader { | ||
loadIntrospection(): Promise<IntrospectionQuery | null>; | ||
loadSchema(): Promise<GraphQLSchema | null>; | ||
notifyOnUpdate(onUpdate: () => void): () => void; | ||
} | ||
interface LoadFromSDLConfig { | ||
assumeValid?: boolean; | ||
file: string; | ||
} | ||
declare function loadFromSDL(config: LoadFromSDLConfig): SchemaLoader; | ||
interface LoadFromURLConfig { | ||
url: URL | string; | ||
headers?: HeadersInit; | ||
interval?: number; | ||
} | ||
declare function loadFromURL(config: LoadFromURLConfig): SchemaLoader; | ||
declare function preprocessIntrospection({ __schema: schema }: IntrospectionQuery): string; | ||
@@ -52,8 +70,6 @@ | ||
declare const resolveTypeScriptRootDir: ( | ||
readFile: (path: string) => string | undefined, | ||
tsconfigPath: string | ||
) => string | undefined; | ||
declare const resolveTypeScriptRootDir: (tsconfigPath: string) => Promise<string | undefined>; | ||
export { | ||
type SchemaLoader, | ||
type VirtualCompilerHost, | ||
@@ -64,2 +80,4 @@ createProgram, | ||
importModule, | ||
loadFromSDL, | ||
loadFromURL, | ||
minifyIntrospection, | ||
@@ -66,0 +84,0 @@ outputIntrospectionFile, |
{ | ||
"name": "@gql.tada/internal", | ||
"version": "0.1.1", | ||
"version": "0.1.2-canary-5c645c6115aa1525436715440c451105ff494e20", | ||
"public": true, | ||
@@ -38,4 +38,6 @@ "description": "Internal logic for gql.tada’s CLI tool and GraphQLSP.", | ||
"devDependencies": { | ||
"@types/node": "^20.11.0", | ||
"@urql/core": "^4.3.0", | ||
"@urql/exchange-retry": "^1.2.1", | ||
"@urql/introspection": "^1.0.3", | ||
"@types/node": "^20.11.0", | ||
"json5": "^2.2.3", | ||
@@ -48,2 +50,3 @@ "rollup": "^4.9.4", | ||
"dependencies": { | ||
"@0no-co/graphql.web": "^1.0.4", | ||
"graphql": "^16.8.1" | ||
@@ -50,0 +53,0 @@ }, |
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
Network access
Supply chain riskThis module accesses the network.
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
592121
8640
3
9
32
4
+ Added@0no-co/graphql.web@^1.0.4
+ Added@0no-co/graphql.web@1.0.11(transitive)