graphql-type-json#GraphQLJSON TypeScript Examples
The following examples show how to use
graphql-type-json#GraphQLJSON.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: json-nullable-with-aggregates-filter.input.ts From prisma-nestjs-graphql with MIT License | 5 votes |
@Field(() => GraphQLJSON, { nullable: true })
gte?: any;
Example #2
Source File: json-nullable-filter.input.ts From prisma-nestjs-graphql with MIT License | 5 votes |
@Field(() => GraphQLJSON, { nullable: true })
gt?: any;
Example #3
Source File: json-nullable-filter.input.ts From prisma-nestjs-graphql with MIT License | 5 votes |
@Field(() => GraphQLJSON, { nullable: true })
gte?: any;
Example #4
Source File: json-nullable-filter.input.ts From prisma-nestjs-graphql with MIT License | 5 votes |
@Field(() => GraphQLJSON, { nullable: true })
not?: any;
Example #5
Source File: json-nullable-with-aggregates-filter.input.ts From prisma-nestjs-graphql with MIT License | 5 votes |
@Field(() => GraphQLJSON, { nullable: true })
equals?: any;
Example #6
Source File: json-nullable-with-aggregates-filter.input.ts From prisma-nestjs-graphql with MIT License | 5 votes |
@Field(() => GraphQLJSON, { nullable: true })
array_contains?: any;
Example #7
Source File: json-nullable-with-aggregates-filter.input.ts From prisma-nestjs-graphql with MIT License | 5 votes |
@Field(() => GraphQLJSON, { nullable: true })
array_starts_with?: any;
Example #8
Source File: json-nullable-with-aggregates-filter.input.ts From prisma-nestjs-graphql with MIT License | 5 votes |
@Field(() => GraphQLJSON, { nullable: true })
array_ends_with?: any;
Example #9
Source File: json-nullable-with-aggregates-filter.input.ts From prisma-nestjs-graphql with MIT License | 5 votes |
@Field(() => GraphQLJSON, { nullable: true })
lt?: any;
Example #10
Source File: json-nullable-with-aggregates-filter.input.ts From prisma-nestjs-graphql with MIT License | 5 votes |
@Field(() => GraphQLJSON, { nullable: true })
lte?: any;
Example #11
Source File: json-nullable-with-aggregates-filter.input.ts From prisma-nestjs-graphql with MIT License | 5 votes |
@Field(() => GraphQLJSON, { nullable: true })
gt?: any;
Example #12
Source File: json-nullable-filter.input.ts From prisma-nestjs-graphql with MIT License | 5 votes |
@Field(() => GraphQLJSON, { nullable: true })
lte?: any;
Example #13
Source File: json-nullable-with-aggregates-filter.input.ts From prisma-nestjs-graphql with MIT License | 5 votes |
@Field(() => GraphQLJSON, { nullable: true })
not?: any;
Example #14
Source File: nested-json-nullable-filter.input.ts From prisma-nestjs-graphql with MIT License | 5 votes |
@Field(() => GraphQLJSON, { nullable: true })
equals?: any;
Example #15
Source File: nested-json-nullable-filter.input.ts From prisma-nestjs-graphql with MIT License | 5 votes |
@Field(() => GraphQLJSON, { nullable: true })
array_contains?: any;
Example #16
Source File: nested-json-nullable-filter.input.ts From prisma-nestjs-graphql with MIT License | 5 votes |
@Field(() => GraphQLJSON, { nullable: true })
array_starts_with?: any;
Example #17
Source File: nested-json-nullable-filter.input.ts From prisma-nestjs-graphql with MIT License | 5 votes |
@Field(() => GraphQLJSON, { nullable: true })
array_ends_with?: any;
Example #18
Source File: nested-json-nullable-filter.input.ts From prisma-nestjs-graphql with MIT License | 5 votes |
@Field(() => GraphQLJSON, { nullable: true })
lt?: any;
Example #19
Source File: nested-json-nullable-filter.input.ts From prisma-nestjs-graphql with MIT License | 5 votes |
@Field(() => GraphQLJSON, { nullable: true })
lte?: any;
Example #20
Source File: nested-json-nullable-filter.input.ts From prisma-nestjs-graphql with MIT License | 5 votes |
@Field(() => GraphQLJSON, { nullable: true })
gt?: any;
Example #21
Source File: nested-json-nullable-filter.input.ts From prisma-nestjs-graphql with MIT License | 5 votes |
@Field(() => GraphQLJSON, { nullable: true })
gte?: any;
Example #22
Source File: nested-json-nullable-filter.input.ts From prisma-nestjs-graphql with MIT License | 5 votes |
@Field(() => GraphQLJSON, { nullable: true })
not?: any;
Example #23
Source File: dummy-unchecked-create.input.ts From prisma-nestjs-graphql with MIT License | 5 votes |
@Field(() => GraphQLJSON, { nullable: true })
json?: any;
Example #24
Source File: generateSchema.ts From davinci with MIT License | 5 votes |
scalarDict = {
number: GraphQLFloat,
string: GraphQLString,
boolean: GraphQLBoolean,
object: GraphQLJSON,
date: GraphQLDateTime
}
Example #25
Source File: buildWhereInputType.ts From payload with MIT License | 5 votes |
buildWhereInputType = (name: string, fields: Field[], parentName: string): GraphQLInputObjectType => {
// This is the function that builds nested paths for all
// field types with nested paths.
const fieldTypes = fields.reduce((schema, field) => {
if (!fieldIsPresentationalOnly(field) && !field.hidden) {
const getFieldSchema = fieldToSchemaMap(parentName)[field.type];
if (getFieldSchema) {
const fieldSchema = getFieldSchema(field);
if (fieldHasSubFields(field)) {
return {
...schema,
...(fieldSchema.reduce((subFields, subField) => ({
...subFields,
[formatName(subField.key)]: subField.type,
}), {})),
};
}
return {
...schema,
[formatName(field.name)]: fieldSchema,
};
}
}
return schema;
}, {});
fieldTypes.id = {
type: withOperators(
{ name: 'id' } as FieldAffectingData,
GraphQLJSON,
parentName,
[...operators.equality, ...operators.contains],
),
};
const fieldName = formatName(name);
return new GraphQLInputObjectType({
name: `${fieldName}_where`,
fields: {
...fieldTypes,
OR: {
type: new GraphQLList(new GraphQLInputObjectType({
name: `${fieldName}_where_or`,
fields: fieldTypes,
})),
},
AND: {
type: new GraphQLList(new GraphQLInputObjectType({
name: `${fieldName}_where_and`,
fields: fieldTypes,
})),
},
},
});
}
Example #26
Source File: init.ts From payload with MIT License | 5 votes |
function registerPreferences(): void {
const {
findOne, update, delete: deleteOperation,
} = this.operations.preferences;
const valueType = GraphQLJSON;
const preferenceType = new GraphQLObjectType({
name: 'Preference',
fields: {
key: {
type: GraphQLNonNull(GraphQLString),
},
value: { type: valueType },
createdAt: { type: new GraphQLNonNull(DateTimeResolver) },
updatedAt: { type: new GraphQLNonNull(DateTimeResolver) },
},
});
this.Query.fields.Preference = {
type: preferenceType,
args: {
key: { type: GraphQLString },
},
resolve: (_, { key }, context) => {
const { user } = context.req;
return findOne({ key, user, req: context.req });
},
};
this.Mutation.fields.updatePreference = {
type: preferenceType,
args: {
key: { type: new GraphQLNonNull(GraphQLString) },
value: { type: valueType },
},
resolve: (_, { key, value }, context) => {
const { user } = context.req;
return update({ key, user, req: context.req, value });
},
};
this.Mutation.fields.deletePreference = {
type: preferenceType,
args: {
key: { type: new GraphQLNonNull(GraphQLString) },
},
resolve: (_, { key }, context) => {
const { user } = context.req;
return deleteOperation({ key, user, req: context.req });
},
};
}
Example #27
Source File: dummy-create-many.input.ts From prisma-nestjs-graphql with MIT License | 5 votes |
@Field(() => GraphQLJSON, { nullable: true })
json?: any;
Example #28
Source File: dummy-create.input.ts From prisma-nestjs-graphql with MIT License | 5 votes |
@Field(() => GraphQLJSON, { nullable: true })
json?: any;
Example #29
Source File: dummy-group-by.output.ts From prisma-nestjs-graphql with MIT License | 5 votes |
@Field(() => GraphQLJSON, { nullable: true })
json?: any;