@octokit/graphql
Advanced tools
Comparing version 4.4.1 to 4.5.0
@@ -8,3 +8,3 @@ 'use strict'; | ||
const VERSION = "4.4.1"; | ||
const VERSION = "4.5.0"; | ||
@@ -11,0 +11,0 @@ class GraphqlError extends Error { |
@@ -1,1 +0,1 @@ | ||
export const VERSION = "4.4.1"; | ||
export const VERSION = "4.5.0"; |
import { GraphQlEndpointOptions, GraphQlQueryResponse } from "./types"; | ||
export declare class GraphqlError<T extends GraphQlQueryResponse> extends Error { | ||
export declare class GraphqlError<ResponseData> extends Error { | ||
request: GraphQlEndpointOptions; | ||
constructor(request: GraphQlEndpointOptions, response: { | ||
data: Required<GraphQlQueryResponse>; | ||
data: Required<GraphQlQueryResponse<ResponseData>>; | ||
}); | ||
} |
import { request as Request } from "@octokit/request"; | ||
import { RequestParameters, GraphQlQueryResponseData } from "./types"; | ||
export declare function graphql(request: typeof Request, query: string | RequestParameters, options?: RequestParameters): Promise<GraphQlQueryResponseData>; | ||
export declare function graphql<ResponseData = GraphQlQueryResponseData>(request: typeof Request, query: string | RequestParameters, options?: RequestParameters): Promise<ResponseData>; |
import { EndpointOptions, RequestParameters as RequestParametersType, EndpointInterface } from "@octokit/types"; | ||
import { graphql } from "./graphql"; | ||
export declare type GraphQlEndpointOptions = EndpointOptions & { | ||
@@ -17,3 +16,3 @@ variables?: { | ||
*/ | ||
(options: RequestParameters): GraphQlResponse; | ||
<ResponseData>(options: RequestParameters): GraphQlResponse<ResponseData>; | ||
/** | ||
@@ -25,3 +24,3 @@ * Sends a GraphQL query request based on endpoint options | ||
*/ | ||
(query: Query, parameters?: RequestParameters): GraphQlResponse; | ||
<ResponseData>(query: Query, parameters?: RequestParameters): GraphQlResponse<ResponseData>; | ||
/** | ||
@@ -36,8 +35,8 @@ * Returns a new `endpoint` with updated route and parameters | ||
} | ||
export declare type GraphQlResponse = ReturnType<typeof graphql>; | ||
export declare type GraphQlResponse<ResponseData> = Promise<ResponseData>; | ||
export declare type GraphQlQueryResponseData = { | ||
[key: string]: any; | ||
} | null; | ||
export declare type GraphQlQueryResponse = { | ||
data: GraphQlQueryResponseData; | ||
}; | ||
export declare type GraphQlQueryResponse<ResponseData> = { | ||
data: ResponseData; | ||
errors?: [{ | ||
@@ -44,0 +43,0 @@ message: string; |
@@ -1,1 +0,1 @@ | ||
export declare const VERSION = "4.4.1"; | ||
export declare const VERSION = "4.5.0"; |
import { request } from '@octokit/request'; | ||
import { getUserAgent } from 'universal-user-agent'; | ||
const VERSION = "4.4.1"; | ||
const VERSION = "4.5.0"; | ||
@@ -6,0 +6,0 @@ class GraphqlError extends Error { |
{ | ||
"name": "@octokit/graphql", | ||
"description": "GitHub GraphQL API client for browsers and Node", | ||
"version": "4.4.1", | ||
"version": "4.5.0", | ||
"license": "MIT", | ||
@@ -38,3 +38,3 @@ "files": [ | ||
"@types/jest": "^25.1.0", | ||
"@types/node": "^13.1.0", | ||
"@types/node": "^14.0.4", | ||
"fetch-mock": "^9.0.0", | ||
@@ -41,0 +41,0 @@ "jest": "^25.1.0", |
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
31831
291