Update apollo-codegen to latest version 0.20.0

This commit is contained in:
mcarrasco
2018-06-25 14:57:22 +02:00
parent 8cfe3b2c5a
commit 38ec5b6cca
2 changed files with 14 additions and 15 deletions

View File

@@ -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,

View File

@@ -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;