Socket
Socket
Sign inDemoInstall

apollo-codegen-typescript

Package Overview
Dependencies
Maintainers
2
Versions
167
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apollo-codegen-typescript - npm Package Compare versions

Comparing version 0.28.2-register.0 to 0.29.0

lib/codeGeneration.d.ts.map

1

lib/codeGeneration.d.ts

@@ -58,1 +58,2 @@ import { GraphQLEnumType, GraphQLInputObjectType } from "graphql";

export {};
//# sourceMappingURL=codeGeneration.d.ts.map

5

lib/codeGeneration.js

@@ -11,2 +11,3 @@ "use strict";

const printer_1 = require("./printer");
const definition_1 = require("graphql/type/definition");
const graphql_2 = require("graphql");

@@ -158,3 +159,3 @@ const array_1 = require("apollo-codegen-core/lib/utilities/array");

}
if (type instanceof graphql_2.GraphQLList) {
if (definition_1.isListType(type)) {
return this.getUnderlyingType(type.ofType);

@@ -168,3 +169,3 @@ }

}
if (type instanceof graphql_2.GraphQLList) {
if (definition_1.isListType(type)) {
type = type.ofType;

@@ -171,0 +172,0 @@ }

@@ -5,1 +5,2 @@ import { GraphQLType } from "graphql";

export declare function createTypeFromGraphQLTypeFunction(compilerOptions: CompilerOptions): (graphQLType: GraphQLType, typeName?: string) => t.TSType;
//# sourceMappingURL=helpers.d.ts.map

@@ -14,3 +14,3 @@ "use strict";

function nonNullableTypeFromGraphQLType(graphQLType, typeName) {
if (graphQLType instanceof graphql_1.GraphQLList) {
if (graphql_1.isListType(graphQLType)) {
const elementType = typeFromGraphQLType(graphQLType.ofType, typeName);

@@ -33,3 +33,3 @@ return t.TSArrayType(t.isTSUnionType(elementType)

}
else if (graphQLType instanceof graphql_1.GraphQLNonNull) {
else if (graphql_1.isNonNullType(graphQLType)) {
return typeFromGraphQLType(graphQLType.ofType, typeName);

@@ -42,3 +42,3 @@ }

function typeFromGraphQLType(graphQLType, typeName) {
if (graphQLType instanceof graphql_1.GraphQLNonNull) {
if (graphql_1.isNonNullType(graphQLType)) {
return nonNullableTypeFromGraphQLType(graphQLType.ofType, typeName);

@@ -45,0 +45,0 @@ }

export { generateSource, generateLocalSource, generateGlobalSource } from "./codeGeneration";
//# sourceMappingURL=index.d.ts.map

@@ -30,1 +30,2 @@ import { GraphQLEnumType, GraphQLInputObjectType, GraphQLType } from "graphql";

}
//# sourceMappingURL=language.d.ts.map

@@ -11,1 +11,2 @@ import * as t from "@babel/types";

export {};
//# sourceMappingURL=printer.d.ts.map
{
"name": "apollo-codegen-typescript",
"description": "TypeScript generator module for Apollo Codegen",
"version": "0.28.2-register.0+36a3f2e",
"version": "0.29.0",
"author": "Apollo GraphQL <opensource@apollographql.com>",

@@ -9,14 +9,8 @@ "license": "MIT",

"type": "git",
"url": "git+https://github.com/apollographql/apollo-cli.git"
"url": "git+https://github.com/apollographql/apollo-tooling.git"
},
"homepage": "https://github.com/apollographql/apollo-cli",
"bugs": "https://github.com/apollographql/apollo-cli/issues",
"homepage": "https://github.com/apollographql/apollo-tooling",
"bugs": "https://github.com/apollographql/apollo-tooling/issues",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
"clean": "rm -rf lib",
"prebuild": "npm run clean",
"build": "tsc",
"prepare": "npm run build"
},
"engines": {

@@ -27,4 +21,5 @@ "node": ">=8",

"dependencies": {
"@babel/types": "7.0.0-beta.38",
"apollo-codegen-core": "0.29.0-register.0+36a3f2e",
"@babel/types": "7.1.3",
"apollo-codegen-core": "0.29.0",
"apollo-env": "0.2.0",
"change-case": "^3.0.1",

@@ -34,2 +29,7 @@ "inflected": "^2.0.3"

"jest": {
"preset": "ts-jest",
"transformIgnorePatterns": [
"/node_modules/",
"/apollo-env/"
],
"testEnvironment": "node",

@@ -40,3 +40,3 @@ "testMatch": [

"setupFiles": [
"<rootDir>/../apollo-codegen-core/src/polyfills.ts"
"<rootDir>/../apollo-env/lib/index.js"
],

@@ -49,5 +49,2 @@ "testPathIgnorePatterns": [

],
"transform": {
"^.+\\.(ts|js)x?$": "<rootDir>../../node_modules/ts-jest/preprocessor.js"
},
"moduleFileExtensions": [

@@ -59,7 +56,8 @@ "ts",

"ts-jest": {
"skipBabel": true
"tsConfig": "<rootDir>/tsconfig.test.json",
"diagnostics": false
}
}
},
"gitHead": "36a3f2edab15c1ba5ffdf67c7fe2b5797264a730"
"gitHead": "1117838bfcaee5aa4d70e3593d8653b1e360dc88"
}

@@ -5,6 +5,6 @@ import { parse } from "graphql";

const schema = loadSchema(
require.resolve("../../../common-test/fixtures/starwars/schema.json")
require.resolve("../../../../__fixtures__/starwars/schema.json")
);
const miscSchema = loadSchema(
require.resolve("../../../common-test/fixtures/misc/schema.json")
require.resolve("../../../../__fixtures__/misc/schema.json")
);

@@ -11,0 +11,0 @@

@@ -29,3 +29,3 @@ import * as path from "path";

import Printer from "./printer";
import { GraphQLType } from "graphql/type/definition";
import { GraphQLType, isListType } from "graphql/type/definition";
import {

@@ -35,3 +35,2 @@ GraphQLNonNull,

getNullableType,
GraphQLList,
GraphQLObjectType

@@ -393,3 +392,3 @@ } from "graphql";

}
if (type instanceof GraphQLList) {
if (isListType(type)) {
return this.getUnderlyingType(type.ofType);

@@ -458,3 +457,3 @@ }

if (type instanceof GraphQLList) {
if (isListType(type)) {
type = type.ofType;

@@ -461,0 +460,0 @@ }

@@ -6,7 +6,7 @@ import {

GraphQLID,
GraphQLList,
GraphQLNonNull,
GraphQLScalarType,
GraphQLString,
GraphQLType
GraphQLType,
isListType,
isNonNullType
} from "graphql";

@@ -33,3 +33,3 @@

): t.TSType {
if (graphQLType instanceof GraphQLList) {
if (isListType(graphQLType)) {
const elementType = typeFromGraphQLType(graphQLType.ofType, typeName);

@@ -54,3 +54,3 @@ return t.TSArrayType(

}
} else if (graphQLType instanceof GraphQLNonNull) {
} else if (isNonNullType(graphQLType)) {
// This won't happen; but for TypeScript completeness:

@@ -67,3 +67,3 @@ return typeFromGraphQLType(graphQLType.ofType, typeName);

): t.TSType {
if (graphQLType instanceof GraphQLNonNull) {
if (isNonNullType(graphQLType)) {
return nonNullableTypeFromGraphQLType(graphQLType.ofType, typeName);

@@ -70,0 +70,0 @@ } else {

{
"extends": "../../tsconfig.base",
"compilerOptions": {
"declaration": true,
"outDir": "lib"
"rootDir": "./src",
"outDir": "./lib"
},
"include" : [ "src/**/*" ],
"exclude": [ "**/__tests__/*" ]
"include": ["./src/**/*"],
"exclude": ["**/__tests__/*", "**/__mocks__/*"],
"references": [{ "path": "../apollo-codegen-core" }]
}

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