Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

stook-graphql

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stook-graphql - npm Package Compare versions

Comparing version 0.0.1 to 0.1.0

dist/clients.d.ts

10

dist/index.d.ts

@@ -1,4 +0,8 @@

export * from './GlobalStore';
export * from './useStore';
export * from './mutate';
export { query } from './query';
export { useQuery } from './use-query';
export { useMutate } from './use-mutate';
export { useSubscribe } from './use-subscribe';
export { fromSubscription } from './from-subscription';
export * from './config';
export * from './types';
export * from './fetcher';

@@ -5,5 +5,5 @@

if (process.env.NODE_ENV === 'production') {
module.exports = require('./stook.cjs.production.min.js')
module.exports = require('./stook-graphql.cjs.production.min.js')
} else {
module.exports = require('./stook.cjs.development.js')
module.exports = require('./stook-graphql.cjs.development.js')
}

@@ -1,2 +0,60 @@

export declare type Action<S> = S | ((prevState: S) => S) | ((prevState: S) => void);
export declare type Trigger<A> = (value: A) => void;
export interface Variables {
[key: string]: any;
}
export declare type Refetch = <T>(options?: Options) => Promise<T>;
export declare type Deps = ReadonlyArray<any>;
export interface Options<T = any> {
name?: string;
variables?: Variables;
deps?: Deps;
headers?: HeadersInit;
data?: T;
onChange?(result: Result<T>): any;
}
export declare type Mutate = (variables: Variables, options?: Options) => any;
export interface FetcherItem<T = any> {
refetch: Refetch;
result: Result<T>;
}
export interface Fetcher<T = any> {
[key: string]: FetcherItem<T>;
}
export interface Result<T = any> {
loading: boolean;
data: T;
error: any;
}
export interface QueryResult<T> extends Result<T> {
refetch: Refetch;
}
export interface MutateResult<T> extends Result<T> {
}
export interface SubscribeResult<T> extends Result<T> {
}
export declare type RequestInterceptor = (config: Options) => any;
export declare type RequestErrorInterceptor = (config: any) => any;
export declare type ResponseInterceptor = (error: any) => any;
export declare type ResponseErrorInterceptor = (error: any) => any;
export interface Interceptor {
requests?: RequestInterceptor[];
requestErrors?: RequestErrorInterceptor[];
responses?: ResponseInterceptor[];
responseErrors?: ResponseErrorInterceptor[];
}
export interface GraphqlConfig {
endpoint: string;
subscriptionsEndpoint?: string;
interceptor?: Interceptor;
headers?: HeadersInit;
}
export interface SubscriptionOption {
variables?: Object;
operationName?: string;
initialQuery?: {
query: string;
variables?: Variables;
};
}
export interface FromSubscriptionOption {
variables?: Object;
}
{
"name": "stook-graphql",
"version": "0.0.1",
"version": "0.1.0",
"license": "MIT",

@@ -53,6 +53,6 @@ "author": "forsigner",

"graphql-tag": "^2.10.1",
"stook": "^0.0.1",
"stook": "^0.1.0",
"subscriptions-transport-ws": "^0.9.16"
},
"gitHead": "25237cb063363b6ec35c03dfba15eb201fd31ed8"
"gitHead": "6f289d6fd6bc14bda198bce378df7138eefe2ed3"
}
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