Comparing version 0.12.0-rc.11 to 0.12.0-rc.12
@@ -0,7 +1,7 @@ | ||
import { GraphQLFieldResolver, GraphQLResolveInfo } from "graphql"; | ||
import { ArgsRecord } from "../definitions/args"; | ||
import { FieldOutConfig } from "../definitions/definitionBlocks"; | ||
import { ObjectDefinitionBlock } from "../definitions/objectType"; | ||
import { GetGen, RootValue, ArgsValue, MaybePromise, ResultValue, MaybePromiseDeep } from "../typegenTypeHelpers"; | ||
import { FieldOutConfig } from "../definitions/definitionBlocks"; | ||
import { AllNexusOutputTypeDefs } from "../definitions/wrapping"; | ||
import { GraphQLResolveInfo, GraphQLFieldResolver } from "graphql"; | ||
import { ArgsValue, GetGen, MaybePromise, MaybePromiseDeep, ResultValue, RootValue } from "../typegenTypeHelpers"; | ||
export interface ConnectionPluginConfig { | ||
@@ -8,0 +8,0 @@ /** |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const tslib_1 = require("tslib"); | ||
const plugin_1 = require("../plugin"); | ||
const dynamicMethod_1 = require("../dynamicMethod"); | ||
const args_1 = require("../definitions/args"); | ||
const objectType_1 = require("../definitions/objectType"); | ||
const dynamicMethod_1 = require("../dynamicMethod"); | ||
const plugin_1 = require("../plugin"); | ||
const utils_1 = require("../utils"); | ||
@@ -46,2 +46,11 @@ const ForwardPaginateArgs = { | ||
// Define the plugin with the appropriate configuration. | ||
let packageName; | ||
try { | ||
packageName = require("../../package.json").name; | ||
} | ||
catch (e) { | ||
console.error('Failed to get name from package manifest for typegen. Falling back to hardcoded "nexus". Error was:\n\n'); | ||
console.error(e); | ||
packageName = "nexus"; | ||
} | ||
return plugin_1.plugin({ | ||
@@ -51,3 +60,3 @@ name: "ConnectionPlugin", | ||
utils_1.printedGenTypingImport({ | ||
module: "nexus", | ||
module: packageName, | ||
bindings: ["core", "connectionPluginCore"], | ||
@@ -54,0 +63,0 @@ }), |
{ | ||
"name": "nexus", | ||
"version": "0.12.0-rc.11", | ||
"version": "0.12.0-rc.12", | ||
"description": "Scalable, strongly typed GraphQL schema development", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -1,24 +0,24 @@ | ||
import { plugin, completeValue } from "../plugin"; | ||
import { GraphQLFieldResolver, GraphQLResolveInfo } from "graphql"; | ||
import { ArgsRecord, intArg, stringArg } from "../definitions/args"; | ||
import { FieldOutConfig } from "../definitions/definitionBlocks"; | ||
import { ObjectDefinitionBlock, objectType } from "../definitions/objectType"; | ||
import { AllNexusOutputTypeDefs } from "../definitions/wrapping"; | ||
import { dynamicOutputMethod } from "../dynamicMethod"; | ||
import { intArg, ArgsRecord, stringArg } from "../definitions/args"; | ||
import { ObjectDefinitionBlock, objectType } from "../definitions/objectType"; | ||
import { completeValue, plugin } from "../plugin"; | ||
import { | ||
printedGenTypingImport, | ||
ArgsValue, | ||
GetGen, | ||
MaybePromise, | ||
MaybePromiseDeep, | ||
ResultValue, | ||
RootValue, | ||
} from "../typegenTypeHelpers"; | ||
import { | ||
eachObj, | ||
mapObj, | ||
isObject, | ||
isPromiseLike, | ||
mapObj, | ||
pathToArray, | ||
printedGenTypingImport, | ||
} from "../utils"; | ||
import { | ||
GetGen, | ||
RootValue, | ||
ArgsValue, | ||
MaybePromise, | ||
ResultValue, | ||
MaybePromiseDeep, | ||
} from "../typegenTypeHelpers"; | ||
import { FieldOutConfig } from "../definitions/definitionBlocks"; | ||
import { AllNexusOutputTypeDefs } from "../definitions/wrapping"; | ||
import { GraphQLResolveInfo, GraphQLFieldResolver } from "graphql"; | ||
@@ -337,2 +337,14 @@ export interface ConnectionPluginConfig { | ||
// Define the plugin with the appropriate configuration. | ||
let packageName; | ||
try { | ||
packageName = require("../../package.json").name; | ||
} catch (e) { | ||
console.error( | ||
'Failed to get name from package manifest for typegen. Falling back to hardcoded "nexus". Error was:\n\n' | ||
); | ||
console.error(e); | ||
packageName = "nexus"; | ||
} | ||
return plugin({ | ||
@@ -342,3 +354,3 @@ name: "ConnectionPlugin", | ||
printedGenTypingImport({ | ||
module: "nexus", | ||
module: packageName, | ||
bindings: ["core", "connectionPluginCore"], | ||
@@ -345,0 +357,0 @@ }), |
Sorry, the diff of this file is not supported yet
893907
14440