You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Ben.
I hope you are ok in these days.
i have a tiny problem with my school project. I want to make a user , post, comment with Graphql ,Express and Mongoose(Mongodb). I have wrote some code but i don't know why its not working. Can you please do me a favor and help me?
I can create user but when i want to create a post related to the user i get this error in playground:
ID cannot represent value: <Buffer 5e 9b f1 3e e9 49 61 38 fc 1a 6f 59>
these are my codes:
TypeDefs:
import { gql } from 'apollo-server-express';
export const typeDefs = gql`
type Query {
users: [User]
posts: [Post]
}
type Mutation {
createUser(name: String,email: String, age: Int): User!
createPost(title: String, body: String, published: Boolean, author: ID): Post!
}
type User {
id: ID!
name: String!
email: String!
age: Int
posts: [Post!]!
comments: [Comment!]!
}
type Post {
id: ID!
title: String!
body: String!
published: Boolean!
author: User!
comments: [Comment!]!
}
type Comment {
id: ID!
text: String!
author: User!
post: Post!
}
`
Hi Ben.
I hope you are ok in these days.
i have a tiny problem with my school project. I want to make a user , post, comment with Graphql ,Express and Mongoose(Mongodb). I have wrote some code but i don't know why its not working. Can you please do me a favor and help me?
I can create user but when i want to create a post related to the user i get this error in playground:
ID cannot represent value: <Buffer 5e 9b f1 3e e9 49 61 38 fc 1a 6f 59>
these are my codes:
TypeDefs:
Resolvers:
UserSchema:
PostSchema:
CommentSchema:
The text was updated successfully, but these errors were encountered: