New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@gql.tada/internal

Package Overview
Dependencies
Maintainers
1
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gql.tada/internal - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2-canary-07bcf12bbd0e49a02bb832668da4fda41d9ad25e

11

CHANGELOG.md
# @gql.tada/internal
## 0.1.2-canary-07bcf12bbd0e49a02bb832668da4fda41d9ad25e
### 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))
- Upgrade `@0no-co/graphql.web` to `1.0.5`
Submitted by [@kitten](https://github.com/kitten) (See [#168](https://github.com/0no-co/gql.tada/pull/168))
- 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))
## 0.1.1

@@ -4,0 +15,0 @@

57

dist/gql-tada-internal.d.ts
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,43 @@ declare function normalize(filename: string): string;

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>;
}
type SchemaOrigin =
| string
| {
url: string;
headers?: HeadersInit;
};
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;
interface LoadConfig {
origin: SchemaOrigin;
rootPath?: string;
fetchInterval?: number;
assumeValid?: boolean;
}
declare function load(config: LoadConfig): SchemaLoader;
declare function preprocessIntrospection({ __schema: schema }: IntrospectionQuery): string;

@@ -52,8 +92,10 @@

declare const resolveTypeScriptRootDir: (
readFile: (path: string) => string | undefined,
tsconfigPath: string
) => string | undefined;
declare const resolveTypeScriptRootDir: (tsconfigPath: string) => Promise<string | undefined>;
export {
type LoadConfig,
type OnSchemaUpdate,
type SchemaLoader,
type SchemaLoaderResult,
type SchemaOrigin,
type VirtualCompilerHost,

@@ -64,2 +106,5 @@ createProgram,

importModule,
load,
loadFromSDL,
loadFromURL,
minifyIntrospection,

@@ -66,0 +111,0 @@ outputIntrospectionFile,

7

package.json
{
"name": "@gql.tada/internal",
"version": "0.1.1",
"version": "0.1.2-canary-07bcf12bbd0e49a02bb832668da4fda41d9ad25e",
"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.5",
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc