peter
02/17/2018, 7:54 PMError: Cannot use GraphQLSchema "[object Object]" from another module or realm.
Ensure that there is only one instance of "graphql" in the node_modules
directory. If different versions of "graphql" are the dependencies of other
relied on modules, use "resolutions" to ensure only one version is installed.
<https://yarnpkg.com/en/docs/selective-version-resolutions>
Duplicate "graphql" modules cannot be used at the same time since different
versions may have different capabilities and behavior. The data from one
version used in the function from another could produce confusing and
spurious results.
at instanceOf (/Users/peter/Sources/Repos/notes/packages/notes-prisma-local/node_modules/graphql/jsutils/instanceOf.js:17:13)
at isSchema (/Users/peter/Sources/Repos/notes/packages/notes-prisma-local/node_modules/graphql/type/schema.js:48:35)
at validateSchema (/Users/peter/Sources/Repos/notes/packages/notes-prisma-local/node_modules/graphql/type/validate.js:51:25)
at assertValidSchema (/Users/peter/Sources/Repos/notes/packages/notes-prisma-local/node_modules/graphql/type/validate.js:76:16)
at Object.validate (/Users/peter/Sources/Repos/notes/packages/notes-prisma-local/node_modules/graphql/validation/validate.js:61:35)
at doRunQuery (/Users/peter/Sources/Repos/notes/packages/notes-prisma-local/node_modules/apollo-server-core/src/runQuery.ts:143:30)
at /Users/peter/Sources/Repos/notes/packages/notes-prisma-local/node_modules/apollo-server-core/src/runQuery.ts:69:39
at <anonymous>
at process._tickDomainCallback (internal/process/next_tick.js:228:7)
lawjolla
02/17/2018, 9:31 PMDownloading nodes !
▸ Cannot read property 'jsonElements' of undefined
which meant the service didn't have data. But mine does. Not sure what's going on.Sean King
02/17/2018, 10:30 PMpatstrz
02/17/2018, 11:22 PMpatstrz
02/17/2018, 11:23 PMpatstrz
02/17/2018, 11:23 PMiamclaytonray
02/17/2018, 11:26 PMharmony
02/17/2018, 11:27 PMiamclaytonray
02/18/2018, 12:05 AMgraphql
and Yarn. I’m not 100% sure how it works but from what I know, it seems as if Yarn tries to install multiple versions of graphql
in your node_modules
. The simplest solution is to rm -rf node_modules && npm i
until the issue is resolved from Yarn’s sideFuturekam
02/18/2018, 1:31 AM{
"data": null,
"errors": [
{
"message": "Field \"user\" of type \"User\" must have a selection of subfields. Did you mean \"user { ... }\"?",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"login"
]
}
]
}
brad.barnes
02/18/2018, 2:01 AMbrad.barnes
02/18/2018, 2:01 AMtype User @model {
id: ID! @isUnique # read-only (managed by Graphcool)
facebookFriends: [User!]! @relation(name:"FacebookFriends")
}
Anybody know why this is happening?Gijo Varghese
02/18/2018, 10:54 AMpnicolaou
02/18/2018, 11:29 AM{
posts {
id
comments(first: 2) {
id
}
}
}
But if i create my own resolver, lets say ‘getPosts’, how do can I implement the same filtering behaviour on the comments, so I can write a query like so
{
getPosts {
id
comments(first: 2) {
id
}
}
}
mv
02/18/2018, 3:18 PMmv
02/18/2018, 3:21 PMtype Cell {
id: ID! @unique
name: String!
parent: Cell @relation(name: "CellsRelationship")
children: [Cell!]! @relation(name: "CellsRelationship")
}
And here is what I obtain when I create two cells:
1) a first with no parent (root of the structure)
2) then another with the previously created cell defined as a parent:
{
"id": "cjdswp3h40bnl0128th7xh704",
"name": "Vision",
"parent": null,
"children": []
},
{
"id": "cjdswzmjh0bwh0128tw6l18fv",
"name": "Market Channels",
"parent": {
"name": "Vision"
},
"children": [
{
"id": "cjdswp3h40bnl0128th7xh704",
"name": "Vision"
}
]
}
mv
02/18/2018, 3:22 PMchildren
list, it ends up in its own children
list.jaaberg
02/18/2018, 3:41 PMtype: UserType! @default(value: "SOME_ENUM")
. The field gets created, but without the default value. Is this some kind of bug or just me doing something wrong?Moritz
02/18/2018, 3:58 PMevery
filter in a query? I would like to query a group that contains exactly an array of users like so: const group = await ctx.db.query.groups(
{
where: {
users_every: users
}
},
info,
)
wherein users is an array of ids. However, I somehow cannot meet the required format. What do I pass to the users_every as a parameter?Moritz
02/18/2018, 4:18 PMOR
with the id array does the trick. I did not realize that OR is an UserWhereInput
type. Nice design! const group = await ctx.db.query.groups(
{
where:{
users_every: {OR: users}
}
},
info,
)
jof
02/18/2018, 5:28 PMprisma token
in prisma.yml but getting your token is invalid
when running prisma playground
still. What am I doing wrong?jof
02/18/2018, 5:28 PMatito
02/18/2018, 5:40 PMpeter
02/18/2018, 8:55 PMError: Error: Network error: Network request failed. Payload is not serializable: Converting circular structure to JSON
martin
02/18/2018, 9:02 PMFuturekam
02/19/2018, 2:32 AMfragosti
02/19/2018, 3:26 AMCould not connect to cluster digital-ocean-cluster with host <http://159.65.177.26:4466>. Did you provide the right port?
wsakaren
02/19/2018, 7:18 AMjsan
02/19/2018, 11:20 AM<http://d0b5iw4041.execute-api.eu-west-1.amazonaws.com/:1|d0b5iw4041.execute-api.eu-west-1.amazonaws.com/:1> POST <https://d0b5iw4041.execute-api.eu-west-1.amazonaws.com/prod/create/> net::ERR_ABORTED
VM55 edit:1 Failed to load <https://d0b5iw4041.execute-api.eu-west-1.amazonaws.com/prod/create/>: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '<https://console.graph.cool>' is therefore not allowed access. The response had HTTP status code 502. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
VM55 edit:1 Uncaught (in promise) TypeError: Failed to fetch
jsan
02/19/2018, 11:21 AM