Tag: mongodb
-
Best way to performantly resolve nested GraphQL queries with MongoDB
0 I am trying to write a resolver which gets the accounts belonging to a customer. The parent.accounts attribute is an array of account_ids. In the code below, I attempt to get an array of accounts for each customer. import Account from "../models/accounts.js"; import Customer from "../models/customers.js"; import { AccountInterface } from "../types/accounts.js"; import {…
-
Best way to resolve nested GraphQL queries with MongoDB
0 I am trying to write a resolver which gets the accounts belonging to a customer. The parent.accounts attribute is an array of account_ids. In the code below, I attempt to get an array of accounts for each customer. import Account from "../models/accounts.js"; import Customer from "../models/customers.js"; import { AccountInterface } from "../types/accounts.js"; import {…
-
How to set initialState using Redux Toolkit with data using Apollo’s useQuery?
0 I am trying to call the useQuery hook (something not allowed outside of functional components), in a redux toolkit slice. Is this something that is doable, perhaps using createAsyncThunk or some similar method? My application is built with the MERN stack, so my database is MongoDB, and I’m using Graphql to fetch the data.…
-
can’t set members array in mongodb with prisma
0 I use Prisma, apollo-graphql, and Mongoose to create chat applications but I have this problem, MongoDB gets only _id when I try to create a chat. Prisma Schema: generator client { provider = "prisma-client-js" } datasource db { provider = "mongodb" url = env("DATABASE_URL") } model User { id String @id @default(auto()) @map("_id") @db.ObjectId…
-
Technical Lead – EdgeAll – Dallas, TX
EdgeAll Dallas, TX $60+ Accepts corp to corp applications, Contract: Independent, W2 Skills Angular GraphQL MongoDB Job Description Title: Technical Lead Location: Dallas, TX (On-site) Duration: 12+ Months 10 years of experience in Angular, Node JS, MongoDB on Azure. Good to have will be GraphQL experience. Airlines experience will be an added advantage. Create…
-
What is the difference between GraphQL and mongoose?
-2 I am reading a book about GraphQL, and they claim that one strong point of GraphQL is selecting a field from the database. See sample below: On this image, they selected just the title from the movies on the database. I can do the same using mongoose, using "select". Could I say that mongoose…
-
Backend Developer with Node js, Golang, GraphQL || Sunnyvale, CA(Hybrid – Need locals only) || Must have linkedin & 9+ years of exp. – Nestortechnologies Inc – Sunnyvale, CA
Nestortechnologies Inc Sunnyvale, CA Depends on Experience Accepts corp to corp applications, Contract: IndependentW2, 12 Month(s) Skills Golang GraphQL MongoDB NoSQL Node . js design patterns unit testing Job Description Backend Developer with Node js + Golang + GraphQLSunnyvale, CA (Hybrid – Need locals only)Must have linkedin & 9+ years of exp. Mandatory Skill :(Node js,…
-
Graphql: “message”: “ID cannot represent value: 5a72240cf31713598588b70f”
7 I use moongose for work with mongodb on nodejs based app. Currently, I try to implement Grapqhl based API. My query graphql schema looks like: const schema = buildSchema(` type Query { predictionModels(active: Boolean): [PredictionModel] }, type PredictionModel { _id: ID title: String active: Boolean } `) but when I use: query { predictionModels(active:…
-
Data not displayed in React.js frontend with graphql
0 graphql query running import { gql } from ‘@apollo/client’; const GET_CLIENTS = gql` query getClients { clients { id name email phone } } `; export { GET_CLIENTS }; import {gql} from ‘@apollo/client’; const DELETE_CLIENT = gql` mutation deleteClient($id: ID!) { deleteClient(id:$id) { id name email phone } } `;[enter image description here][1] export…