georgelovegrove
01/28/2018, 5:50 AMBSD
01/28/2018, 8:04 AMtype Post {
id: ID! @unique
createdAt: DateTime!
updatedAt: DateTime!
active: Boolean! @default(value: "true")
title: String!
text: String!
author: User!
category: CATEGORY!
}
I want to create Post and connect to existing user.
How can I do this?
Thanksdivyendu
01/28/2018, 8:16 AMHooks:
Checking, if schema file changed !
βΈ Mutation fields must be an object with field names as keys or a function which returns such an object.
Get in touch if you need help: <https://www.graph.cool/forum>
To get more detailed output, run $ export DEBUG="*"
On prisma deploy
after the line "Your GraphQL database endpoint is live"
And I think it is not getting deployed.
divyendusingh [prisma-backend]$ prisma --version
prisma/1.0.10 (darwin-x64) node-v9.4.0
#Help
UPDATE: This got resolved after I moved back to node 8.4.0
Will confirm if this is a bug and raise an issue πStef
01/28/2018, 8:53 AMJames
01/28/2018, 9:32 AMrein
01/28/2018, 10:26 AMrein
01/28/2018, 10:26 AMAlexander Wolf
01/28/2018, 10:59 AMCannot query field "votes" on type "Feed"
for the react app in the dev tools network tab. I'm new to graphql and not sure where and how to add the votes in the schema.Jack Peterson
01/28/2018, 11:00 AM*Less Important Questions, which are derived from my likely false assumptions:*
Should I create a Type and give it relations?
Should I just stick Lat and Lon in their own fields in the other types?
If I wanted city, zip, lat lon, country, state, county, etc.
Would they be fields in a location type or would I be creating types for each category and then just relate them to eachother?
Alexander Wolf
01/28/2018, 11:01 AMrein
01/28/2018, 11:02 AMpatrick_madx
01/28/2018, 11:27 AMNick Luger
01/28/2018, 11:31 AMdarmie
01/28/2018, 12:39 PMtfiwm
01/28/2018, 3:07 PMisa
01/28/2018, 3:46 PMmnichovcan
01/28/2018, 4:17 PMMark
01/28/2018, 5:39 PMgraphcool init --schema <https://graphqlbin.com/hn-relay.graphql> --name Hackernews
in the terminal...
The schema is invalid:
The relation field `links` has the wrong format: `[Link!]` Possible Formats: `Link`, `Link!`, `[Link!]!`
The relation field `votes` has the wrong format: `[Vote!]` Possible Formats: `Vote`, `Vote!`, `[Vote!]!`
The relation field `votes` has the wrong format: `[Vote!]` Possible Formats: `Vote`, `Vote!`, `[Vote!]!` (Request ID: eu-west-1:system:cjcz2a6u31gf60187vbuzorki)
Mark
01/28/2018, 5:43 PM:~/Desktop/howtographql$ graphcool version
0.4.9
Mark
01/28/2018, 5:44 PMMark
01/28/2018, 5:49 PMmagus
01/28/2018, 6:55 PMmax
01/28/2018, 6:56 PMmagus
01/28/2018, 6:57 PMAvi Block
01/28/2018, 7:39 PMKristof Dombi
01/28/2018, 8:35 PM<http://howtographql.com/react-apollo|howtographql.com/react-apollo>
tutorial and I got blocked by an error at the More mutations and updating the store state
section.
Can someone help me with this?
_updateCacheAfterVote = (store, createVote, linkId) => {
// 1
const data = store.readQuery({ query: FEED_QUERY })
// 2
const votedLink = data.feed.links.find(link => link.id === linkId)
votedLink.votes = createVote.link.votes
// 3
store.writeQuery({ query: FEED_QUERY, data })
}
at store.readQuery({ query: FEED_QUERY })
i get the following error:
index.js:2178 Error: Can't find field feed({"first":100,"skip":0,"orderBy":null}) on object (ROOT_QUERY) {
"feed({\"first\":null,\"skip\":null,\"orderBy\":null})": {
"type": "id",
"id": "$ROOT_QUERY.feed({\"first\":null,\"skip\":null,\"orderBy\":null})",
"generated": true
}
}.
at readStoreResolver (readFromStore.js:39)
at executeField (graphql.js:70)
at graphql.js:27
at Array.forEach (anonymous)
at executeSelectionSet (graphql.js:22)
at graphql (graphql.js:17)
at diffQueryAgainstStore (readFromStore.js:71)
at readQueryFromStore (readFromStore.js:14)
at InMemoryCache../node_modules/apollo-cache-inmemory/lib/inMemoryCache.js.InMemoryCache.read (inMemoryCache.js:75)
at InMemoryCache../node_modules/apollo-cache-inmemory/lib/inMemoryCache.js.InMemoryCache.readQuery (inMemoryCache.js:165)
at Object.LinkList._this._updateCacheAfterVote [as updateStoreAfterVote] (LinkList.js:37)
at update (Link.js:44)
at store.js:113
at tryFunctionOrLogError (errorHandling.js:3)
at store.js:113
at InMemoryCache../node_modules/apollo-cache-inmemory/lib/inMemoryCache.js.InMemoryCache.performTransaction (inMemoryCache.js:135)
at DataStore../node_modules/apollo-client/data/store.js.DataStore.markMutationResult (store.js:112)
at Object.next (QueryManager.js:95)
at SubscriptionObserver.next (zen-observable.js:154)
at httpLink.js:140
at anonymous
Iβve been around the web to find a solution for this problem, but none of them helped me. π
Thanks in advance for your help!Luke.Adams
01/28/2018, 9:32 PMschema.graphql
that currently just has imports from a number of other .graphql
files. Also I am noticing that the codegen pieces also need to inspect my .graphql
files which currently require introspection from graphql-import
as they contain imports. I feel like I am missing a piece here that bridges the codegen to complete the creation of TypeScript types.Luke.Adams
01/28/2018, 9:36 PMAnthony D
01/28/2018, 11:23 PMAnthony D
01/28/2018, 11:23 PM