mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
Update apollo-codegen to latest version 0.20.0
This commit is contained in:
@@ -14,7 +14,7 @@ async function main() {
|
||||
"POST"
|
||||
);
|
||||
|
||||
generate(["input.ts"], "schema.json", "types.ts", "typescript", "gql", {
|
||||
generate(["input.ts"], "schema.json", "types.ts", "", "typescript", "gql", "", {
|
||||
passthroughCustomScalars: false,
|
||||
customScalarsPrefix: "S",
|
||||
addTypename: false,
|
||||
|
||||
27
types/apollo-codegen/index.d.ts
vendored
27
types/apollo-codegen/index.d.ts
vendored
@@ -1,13 +1,15 @@
|
||||
// Type definitions for apollo-codegen 0.16
|
||||
// Type definitions for apollo-codegen 0.20
|
||||
// Project: https://github.com/apollographql/apollo-codegen
|
||||
// Definitions by: Bradley Ayers <https://github.com/bradleyayers>
|
||||
// Definitions by: Bradley Ayers <https://github.com/bradleyayers>, Maria Carrasco <https://github.com/kostspielig>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
import { Options } from 'graphql/utilities/schemaPrinter';
|
||||
|
||||
export function downloadSchema(
|
||||
url: string,
|
||||
outputPath: string,
|
||||
additionalHeaders: { [name: string]: string },
|
||||
additionalHeaders: { [name: string]: string; },
|
||||
insecure: boolean,
|
||||
method: string
|
||||
): Promise<void>;
|
||||
@@ -19,22 +21,19 @@ export function introspectSchema(
|
||||
|
||||
export function printSchema(
|
||||
schemaPath: string,
|
||||
outputPath: string
|
||||
outputPath: string,
|
||||
options?: Options
|
||||
): Promise<void>;
|
||||
|
||||
export type TargetType = 'json' | 'swift' | 'ts-legacy' | 'typescript-legacy' | 'flow-legacy' | 'scala' | 'flow' | 'typescript' | 'ts';
|
||||
|
||||
export function generate(
|
||||
inputPaths: string[],
|
||||
schemaPath: string,
|
||||
outputPath: string,
|
||||
target: "json" | "swift" | "ts" | "typescript" | "flow" | "scala",
|
||||
only: string,
|
||||
target: TargetType,
|
||||
tagName: string,
|
||||
options: {
|
||||
passthroughCustomScalars: boolean;
|
||||
customScalarsPrefix: string;
|
||||
addTypename: boolean;
|
||||
namespace: string;
|
||||
operationIdsPath: string | null;
|
||||
generateOperationIds: boolean;
|
||||
mergeInFieldsFromFragmentSpreads: boolean;
|
||||
}
|
||||
projectName: string,
|
||||
options: any
|
||||
): void;
|
||||
|
||||
Reference in New Issue
Block a user