Tag: mongoose
-
Mongoose not able to create a schema
0 Everything loaded fine before I had added a new schema. This is the resolver: import { Arg, Mutation, Query, Resolver } from "type-graphql"; import { Order } from "./order.schema"; import OrderService from "./order.service"; @Resolver() export default class OrderResolver { constructor(private orderService: OrderService) { this.orderService = new OrderService(); } @Mutation(() => Order) createOrder(@Arg("input") input: any)…
-
GraphQL large integer error: Int cannot represent non 32-bit signed integer value
37 I´m trying to store a UNIX timestamp in MongoDB using GraphQL, but it seens that GraphQL has a limit to handle integers. See the mutation below: const addUser = { type: UserType, description: ‘Add an user’, args: { data: { name: ‘data’, type: new GraphQLNonNull(CompanyInputType) } }, resolve(root, params) { params.data.creationTimestamp = Date.now(); const…