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

    alexedev

    05/27/2017, 11:15 AM
    hello everyone!👋 I need your help graphcool
    🦜 1
  • a

    alexedev

    05/27/2017, 11:16 AM
    well, I’m going to a hackaton and struggling with getting an idea
  • a

    alexedev

    05/27/2017, 11:17 AM
    I will use graphcool because it is really fast to set up and go.
  • a

    alexedev

    05/27/2017, 11:18 AM
    what topics can be interesting for me: a chatbot, music(web audio api?), travel
  • a

    alexedev

    05/27/2017, 11:19 AM
    other technologies that I plan to use are react/redux/apollo and probably nextjs
  • a

    alexedev

    05/27/2017, 11:20 AM
    I also thought about using elm but it can be too challenging because I just started to learn it and am afraid it is too risky for a 36 hours hackaton
  • a

    alexedev

    05/27/2017, 11:20 AM
    I will be grateful for every idea you suggest, thank you in advance 🙂
    n
    • 2
    • 3
  • a

    alexedev

    05/27/2017, 11:46 AM
    I actually think about using spotify api and google maps api to show where your favorite artists are currently. getting inspired by similar apps from spotify developers showcase https://developer.spotify.com/showcase/
  • a

    alexedev

    05/27/2017, 12:22 PM
    songkick api looks good too
    n
    • 2
    • 7
  • r

    richeterre

    05/27/2017, 12:39 PM
    Regarding Graphcool permissions: Can I set up a permission query so that when querying
    allFoobars
    I only get the Foobars that I’m allowed to see? I tried something like
    Copy code
    SomeFoobarExists(
        filter: {
          id: $node_id
          owner: {
            id: $user_id
          }
        }
      )
    but this just gives me a permission error instead of a “scoped” result of Foobars owned by the current user.
    n
    • 2
    • 7
  • s

    sdubois

    05/27/2017, 3:01 PM
    Hi! Let's say I use Graphcool as some kind of CMS with authors, communities, etc etc. Each of them have a unique web page which should be able to show page-specific HTML markup. What's the way to store and render this data in React? Should I add an
    html
    String field to my model, query it with GraphQL then render it with
    dangerouslySetInnerHtml
    ? Is there another less-"dangerous" or more recommended way? Thanks!
  • l

    lastmjs

    05/27/2017, 3:42 PM
    I have a question about cloud functions. Reading the documentation, it looks like functions can only be run in tandem with mutations. I have a use case where I would like to run a function along with a query, to transform the query results before they reach the client. The transformation does not need to be persisted on the back end, but must be run server side before it reaches the client. How can I do this?
  • l

    lastmjs

    05/27/2017, 5:58 PM
    Is there an easy way to do a create or update mutation, where the same data can be sent in the mutation and if the id is defined it will update but if it is not defined it will create it?
  • m

    matthewhager

    05/27/2017, 8:06 PM
    What is the best way to handle a computed value? I have TimeEntries which is relate to a Project. On the Project model, when a TimeEntry is created, I need to update the budgetUsed value. On a function, can you change the value of a related model?
  • p

    patrick

    05/28/2017, 6:48 AM
    anyone home? my console said i should share this here,
    Copy code
    Whoops. Looks like an internal server error. Please contact us in Slack (<https://slack.graph.cool>) and send us your Request ID: cj38cd3h6s0ek0106xlttol0b
    n
    • 2
    • 1
  • k

    kudlajz

    05/28/2017, 8:46 AM
    Hey there .. I'm using this package https://www.npmjs.com/package/@playlyfe/gql in a VSCode plugin to allow for highlighting and autocomplete in graphql schema, but since
    graphcool
    only downloads custom-created types, the schema can't seem to find interfaces like
    Node
    and type
    DateTime
    . Is there a way around this? Does graphcool have some basic schema which can be provided to allow for this to work? Thanks.
    n
    p
    • 3
    • 36
  • k

    kuldar

    05/28/2017, 9:03 AM
    Hey guys, I'm currently implementing basic auth on my React/Graphcool app. I'm using JWT tokens to authorise calls to Graphcool, but what's the right approach to managing the login state on the client side when using React Router? Should I just keep the
    isLogged
    state on the top-most React component? Should I re-verify the user state on each page view? I'm bit lost and unsure how to scope and phrase the question correctly. (PS. I'd like to avoid Redux) 🤥
  • c

    checkmatez

    05/28/2017, 11:49 AM
    Hi! I keep getting error "The specified default value 'InProgress' is not a valid Enum Value for this field" when trying to set up default value for new field with ENUM type...
    n
    • 2
    • 7
  • t

    tfiwm

    05/28/2017, 12:12 PM
    Hi till now i didn’t figured out how exactly the updateOrCreate mutation is really working… and i didn’t found a documentation for it. Can someone explain me it or give me alink where i can read it?
    n
    l
    • 3
    • 2
  • p

    picosam

    05/28/2017, 12:24 PM
    Hello folks! So things are working fine, except my IntelliJ IDE keeps complaining about the above code, giving the following error:
    Cannot query field "createUser" on type "Mutation".
    Any idea how to resolve this?
    -.js
    ✅ 1
  • j

    jimthedev

    05/28/2017, 1:13 PM
    @picosam have you enabled a user auth integration?
    n
    p
    • 3
    • 2
  • t

    theom

    05/28/2017, 1:29 PM
    @nilan Can you shed any light on the following error message I'm getting when attempting to delete a post comment?
    Copy code
    Comments.js:168 GraphQL error: Insufficient permissions for this mutation
    handleSubmitError	@	Comments.js:168
    proxiedMethod	@	createPrototypeProxy.js:44
    https://stackoverflow.com/questions/44225666/apollo-graphcool-insufficient-permissions-for-this-mutation-howto-best-se
    ✅ 1
  • p

    picosam

    05/28/2017, 3:35 PM
    Hello again folks. Is there a way to delete a node (say, a
    User
    ) and all
    File
    nodes associated to that user (simple one-to-many relationship) in one operation/mutation?
    n
    • 2
    • 1
  • k

    kaihuang724

    05/28/2017, 4:40 PM
    Hey guys - I'm getting an error in my data within Graphcool:
    Cannot return null for non-nullable type (line 7, column 45): id createdAt height updatedAt user { id } weight ^
    - It says there's data there, but I can't pull it up. Any ideas?
    n
    • 2
    • 1
  • j

    jpfm

    05/28/2017, 8:26 PM
    Hello all. I have a frustrating problem. I'm just getting started with graphcool, but am struggling to even request from the API. With the following request, I get
    400 (Bad Request)
    with a
    CORS
    error.
    Copy code
    return fetch(API_ENDPOINT_URL, {
    	method: 'post',
    	headers: {
    		Accept: 'application/json',
    		'Content-Type': 'application/json',
    	},
    	body: "{query: 'query { allUsers { id name } }'}",
    })
    When I add
    mode: 'no-cors'
    , the request headers are immutable (see https://stackoverflow.com/questions/38156239/how-to-set-the-content-type-of-request-header-when-using-fetch-api) so I get a
    415 (Unsupported Media Type)
    error because the
    Content-Type
    is
    text/plain
    .
    Copy code
    return fetch(API_ENDPOINT_URL, {
    	method: 'post',
    	mode: 'no-cors',
    	headers: { // This does nothing
    		Accept: 'application/json',
    		'Content-Type': 'application/json',
    	},
    	body: "{query: 'query { allUsers { id name } }'}",
    })
    How can I get up and running? Can't seem to find these issues documented anywhere.
    n
    • 2
    • 28
  • n

    notrab

    05/28/2017, 8:28 PM
    If I have the following query
    Copy code
    {
      allReports(filter: {
        dbrw_gte: 5,
        dbrw_lte: 48,
        manufacturer:{
          id_in: [
            "cj31o9k4y6jxo0127rybvmsac",
          ]
        },
        doorType_in: [
          "Single"
        ]
      }) {
        id
        dbrw
        manufacturer {
          name
        }
        doorType
        doorWidth
      }
    }
    If I’m using Apollo for example, Is it possible to conditionally include the
    manufacturer id_in
    part? Think of this as a sidebar on Amazon for filtering products. When someone clicks a checkbox I want to add the ID to the array but if no ID is given, include them all. Possible?
    n
    • 2
    • 14
  • e

    eddiewang

    05/29/2017, 12:08 AM
    anyone know why this error is occuring on graphcool playground?
  • p

    picosam

    05/29/2017, 7:07 AM
    Bonjour! So anyone has already tried using lokka to run GraphQL queries within
    Functions
    ? Is there a way to do that “locally”? Like without putting the Graph.cool endpoint and… well have admin rights? 😄
    n
    • 2
    • 3
  • p

    ppatidar

    05/29/2017, 9:20 AM
    @nilan How we can save Json in model I have one field with json type I'm creating record using console i'm passing json value like {"name":"John"} Its null at focus out
    ✅ 1
    n
    • 2
    • 5
  • a

    artyom

    05/29/2017, 9:24 AM
    hello everybody and welcome to graphcool! very glad you’re joining us @guy @rex @aflatter @krylovsentry @crisscrossed @jinalex @mika @faure @mithrandirii @aabreu @zmwangx @kirill @tomaash @bakufusyougunn @akorvyakov @mattferrin @gmanfredi @simpod @ralphluring @qq6techsupport @vietworm @jankei @dtuite @dnomak @herreraemanuel @gertjan @tantv @mnbucher @krittin.j58 @slem @perrosnk 👋 👋
    👋 3
    👍 2
1...205206207...637Latest