https://www.prisma.io/ logo
Join Slack
Powered by
# prisma-whats-new
  • g

    georgelovegrove

    01/28/2018, 5:50 AM
    Hopefully a simple question. Doing prisma init and using either basic node or advanced node with auth and then prisma deploy that example (e.g. https://eu1.prisma.sh/public-shadenape-972/new-prisma-auth/dev). Why do auth (signup, login) and post (publish, deletePost, createDraft) mutations in the project not show in the playground, only the prisma wrappings for post and user?
    • 1
    • 1
  • b

    BSD

    01/28/2018, 8:04 AM
    In this data model
    Copy code
    type 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? Thanks
    n
    • 2
    • 1
  • d

    divyendu

    01/28/2018, 8:16 AM
    I am running into the following error
    Copy code
    Hooks:
    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.
    Copy code
    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 πŸ‘
  • s

    Stef

    01/28/2018, 8:53 AM
    Does upgrading your project in the hosted version of Graphcool have any effect on the existing data? I want to do an export of my data before I do that, but that seems to be best achieved using the CLI, which is only usable once I’ve β€œupgraded”.
    n
    • 2
    • 2
  • j

    James

    01/28/2018, 9:32 AM
    How do I write a subscription resolver which can handle "where"? Currently, I'm just using what I found in prisma/examples/subscriptions which is super minimal and there's no detail in the docs about writing resolvers.
    n
    • 2
    • 2
  • r

    rein

    01/28/2018, 10:26 AM
    for those who are using Zeit Now, is it possible to add serverless functions that run in set intervals?
  • r

    rein

    01/28/2018, 10:26 AM
    like a daily function you would be able t create on aws lambda
  • a

    Alexander Wolf

    01/28/2018, 10:59 AM
    Hi, I have a question to the howtographql tutorial. I'm following it until [chapter 6](https://www.howtographql.com/react-apollo/6-more-mutations-and-updating-the-store/) and now I'm getting the following error
    Cannot 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.
    • 1
    • 1
  • j

    Jack Peterson

    01/28/2018, 11:00 AM
    Is there a Standard/Recomended way to do Location with GraphQL?
    Copy code
    *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?
    s
    s
    m
    • 4
    • 5
  • a

    Alexander Wolf

    01/28/2018, 11:01 AM
    @rein have you seen https://github.com/zeit/now-cli/issues/146 github issue? Seems like it's planned but not available yet.
  • r

    rein

    01/28/2018, 11:02 AM
    Thanks Alexander! That makes it clearer.
  • p

    patrick_madx

    01/28/2018, 11:27 AM
    Anyone found a nice way to add resolver middleware in Prisma? πŸ™‚ e.g. add a user to the Context for specific resolvers
    m
    s
    h
    • 4
    • 7
  • n

    Nick Luger

    01/28/2018, 11:31 AM
    Anyone running Prisma on Aurora instead of MySQL?
  • d

    darmie

    01/28/2018, 12:39 PM
    Graphcool file API not working, I am getting a TypeError: Failed to fetch 502 error
    t
    • 2
    • 1
  • t

    tfiwm

    01/28/2018, 3:07 PM
    For me are subscriptions in prisma really unstable at the moment 😞 does anyone has the same problem?
    n
    • 2
    • 20
  • i

    isa

    01/28/2018, 3:46 PM
    i just did the react-apollo tutorial from howtographql and boy how much setup do you need? god damn it was so long. does anyone feel the same way?
  • m

    mnichovcan

    01/28/2018, 4:17 PM
    is possible extend type from generated prisma.graphql in my schema.graphql ?
    a
    • 2
    • 1
  • m

    Mark

    01/28/2018, 5:39 PM
    hi all! I am trying to follow along with the react-relay modern tutorial. I've installed the legacy version of graphcool@0.4 as the note recommends, but I am still getting this error when running
    graphcool init --schema <https://graphqlbin.com/hn-relay.graphql> --name Hackernews
    in the terminal...
    Copy code
    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)
  • m

    Mark

    01/28/2018, 5:43 PM
    searching this error on GitHub, the solution was to intall legacy graphcool@0.4, which I have already done https://github.com/howtographql/howtographql/issues/257
    Copy code
    :~/Desktop/howtographql$ graphcool version
    0.4.9
  • m

    Mark

    01/28/2018, 5:44 PM
    any ideas on how I can solve or work around this issue?
  • m

    Mark

    01/28/2018, 5:49 PM
    nvm, I've copied the schema locally, made the corrections and pointed graphcool init to the updated schema. Hope this helps anyone else that might have this issue!
  • m

    magus

    01/28/2018, 6:55 PM
    Is it possible to filter a query by relational metadata. For example a user object has a related field that I want to filter by count but the meta appears unavailable which leaves me doing a big query and filtering the JSON myself (bad)
    m
    • 2
    • 6
  • m

    max

    01/28/2018, 6:56 PM
    any advice for a production graphql-yoga w/ prisma server would be more than welcome πŸ™‚ https://www.graph.cool/forum/t/advice-on-best-practise-deploying-production-graphql-yoga-server-w-prisma-on-the-public-cluster/2348
  • m

    magus

    01/28/2018, 6:57 PM
    eg Users where Users.manyRelations.count > some value so I only get Users which have a certain number of that relation.
    m
    • 2
    • 2
  • a

    Avi Block

    01/28/2018, 7:39 PM
    Is it possible to access the outside the context of a resolver? For example, I want to make express middleware which checks a JWT and then queries the database for a user
    h
    • 2
    • 1
  • k

    Kristof Dombi

    01/28/2018, 8:35 PM
    Hey πŸ‘‹ I’m going through the
    <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?
    Copy code
    _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:
    Copy code
    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!
    q
    n
    • 3
    • 5
  • l

    Luke.Adams

    01/28/2018, 9:32 PM
    Hello! - I am working on a workflow for server / schema development. I have setup and am using the graphql-import tool to form my schema. We are using TypeScript and the next step would be to create types / interfaces to support resolver development with static types from the schema. I seem to be missing this step. I realize I can generate a schema / json file from a running instance of my service but wondering if there is a way to do this from my same
    schema.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.
    βœ… 1
    a
    • 2
    • 17
  • l

    Luke.Adams

    01/28/2018, 9:36 PM
    Thanks for any guidance here
  • a

    Anthony D

    01/28/2018, 11:23 PM
    Hey Graphcool Community, I just got a quick question as I plan to move from the shared cluster to the private cluster. Does moving from the shared cluster to a private cluster require data migration on my part or does the graph cool team take care of this?
    s
    • 2
    • 1
  • a

    Anthony D

    01/28/2018, 11:23 PM
    @Anthony D pinned a message to this channel.
1...548549550...637Latest