mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Add GraphQLJSONObject type to graphql-type-json definition (#35190)
* update graphql-type-json definitions * update tests
This commit is contained in:
parent
498c398948
commit
e18af54e46
@ -1,20 +1,26 @@
|
||||
import { GraphQLObjectType, GraphQLInputObjectType } from "graphql";
|
||||
import * as GraphQLJSON from "graphql-type-json";
|
||||
import GraphQLJSON, { GraphQLJSONObject } from "graphql-type-json";
|
||||
|
||||
const TestType = new GraphQLObjectType({
|
||||
name: "TestType",
|
||||
fields: {
|
||||
test: {
|
||||
testValue: {
|
||||
type: GraphQLJSON
|
||||
}
|
||||
},
|
||||
testObject: {
|
||||
type: GraphQLJSONObject
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
const TestInputType = new GraphQLInputObjectType({
|
||||
name: "TestInputType",
|
||||
fields: {
|
||||
test: {
|
||||
type: GraphQLJSON
|
||||
}
|
||||
testValue: {
|
||||
type: GraphQLJSON
|
||||
},
|
||||
testObject: {
|
||||
type: GraphQLJSONObject
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
8
types/graphql-type-json/index.d.ts
vendored
8
types/graphql-type-json/index.d.ts
vendored
@ -1,4 +1,4 @@
|
||||
// Type definitions for graphql-type-json 0.1
|
||||
// Type definitions for graphql-type-json 0.3
|
||||
// Project: https://github.com/taion/graphql-type-json#readme
|
||||
// Definitions by: Pavel Ivanov <https://github.com/schfkt>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@ -6,5 +6,7 @@
|
||||
|
||||
import { GraphQLScalarType } from "graphql";
|
||||
|
||||
declare const GraphQLJSON: GraphQLScalarType;
|
||||
export = GraphQLJSON;
|
||||
export const GraphQLJSONObject: GraphQLScalarType;
|
||||
|
||||
export const GraphQLJSON: GraphQLScalarType;
|
||||
export default GraphQLJSON;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user