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

    anu

    06/29/2017, 6:17 PM
    I was trying to use
    get-graphql-schema
    to generate a
    schema.graphql
    for my project. The command executed well without error but I didn't see any
    schema.graphql
    file generated.
    n
    n
    • 3
    • 4
  • n

    nikolasburk

    06/29/2017, 6:20 PM
    you need to use the following:
    Copy code
    get-graphql-schema <https://api.graph.cool/relay/v1/cj4hfp3hs4y0m01305nyj3neo> > ./schema.graphql
    👍 2
  • n

    nikolasburk

    06/29/2017, 6:21 PM
    the
    >
    will write the output into the file called
    schema.graphql
    👍 1
    a
    • 2
    • 2
  • a

    anu

    06/29/2017, 6:26 PM
    Another problem I am having is, trying to run the relay-compiler, I get this error
    Copy code
    Watchman:  Watchman was not found in PATH.  See <https://facebook.github.io/watchman/docs/install.html> for installation instructions
  • a

    anu

    06/29/2017, 6:28 PM
    I think the
    relay-compiler
    is trying to compile my test files also. I will sort that out. Thanks for being helpful
    n
    n
    • 3
    • 4
  • p

    phil

    06/29/2017, 7:53 PM
    I want to add a set of related types (
    categories
    ) that are generated within the
    updateXXX
    mutation method:
    Copy code
    mutation addTeamCategory($teamId:ID!, $orgId:ID!, $key:String!, $value:String!) {
          updateTeam(
            id:$teamId
            orgId: $orgId
            categories:{
              key: $key
              value: $value
            }
          )
          {
            id
          }
        }
    the example above creates a single item within the
    categories
    relationship. How would I (could I?) go about adding/generating multiple categories in this one mutation query? Thanks!
    n
    • 2
    • 4
  • b

    bobbyt

    06/29/2017, 9:49 PM
    Hi! I was wondering if there was an easy technique to combine a query with a mutation that can be run from Graphcool playground? For example, I would query
    allUsers()
    , then for each User, based on its timestamp field (type of
    DateTime
    ) call a mutation that updates a value in another field for that User (i.e., unixTimestamp of type
    Int
    ). Thanks!
    a
    n
    • 3
    • 6
  • m

    martin

    06/29/2017, 9:59 PM
    Is there a way to call graphcool mutations directly without tying them to components in React? So instead of this:
    Copy code
    const sendNotification = gql`
      mutation($notificationId: ID!) {
        sendNotification: updateNotifications(id: $notificationId, complete: true) {
          id
        }
      }
    `
    class ReactComponent extends React.Component {
       ...
    }
    graphql(sendNotification, { name: 'sendNotification' })(ReactComponent)
    Is it possible to somehow call the
    sendNotification
    mutation in an external function to where it’s not tied to the current component and called via
    this.props
    ?
    n
    • 2
    • 13
  • p

    patstrz

    06/29/2017, 11:05 PM
    Hi graphcool ers ! does this count as 1 request:
    Copy code
    mutation createChallengeAndScore{
      createChallenge(title:"title"){
        id
      }
      createScore(value:50, scorecardId:"cj4g9eonx7pyx0160shz7xlbp" ){
        value
      }
    }
    ?
  • a

    agartha

    06/29/2017, 11:15 PM
    https://www.graph.cool/pricing/
    👍 1
  • j

    joshmadewell

    06/30/2017, 2:52 AM
    hey guys, I have an interesting issue that I’m sure someone has solved here… I have my Users model restricted so that anyone can create them but only authenticated users are allowed to see information and they’re only allowed to see the information of themselves… this means when I use the
    createUser
    mutation and I’m required to get the
    id
    back I fail
    Copy code
    createUser(
        authProvider: {
          email: {
            email: $email,
            password: $password
          },
        },
        firstName: $firstName,
        lastName: $lastName
      ) {
        id
      }
    )
    I really don’t want to expose the User to
    everyone
    because if I understand correctly, that means anyone could query my data store for all my users…?
    p
    l
    n
    • 4
    • 5
  • j

    joshmadewell

    06/30/2017, 2:52 AM
    does anyone have any ideas of how I could do this differently?
    m
    • 2
    • 1
  • m

    marcusstenbeck

    06/30/2017, 6:03 AM
    Hey, the email auth provider doesn’t actually care if it’s an email provided in tme
    email
    field, right? If that’s the case I think you should write that somewhere. Or maybe I just did some funky stuff 🙂
    n
    • 2
    • 1
  • d

    davutokan

    06/30/2017, 6:57 AM
    Hi everyone!
    n
    • 2
    • 2
  • s

    samuell

    06/30/2017, 8:12 AM
    Hey, anybody tested geocode function from examples?
  • s

    samuell

    06/30/2017, 8:16 AM
    i getting some weird error from it
    n
    • 2
    • 7
  • s

    samuell

    06/30/2017, 8:16 AM
    -.txt
  • y

    yukonit

    06/30/2017, 8:30 AM
    Hi everyone!
    👋 1
  • p

    picosam

    06/30/2017, 8:35 AM
    Good morning! In their documentation, Apollo advises the use of
    dataIdFromObject
    to provide an
    ID
    for the store objects: http://dev.apollodata.com/angular2/cache-updates.html#dataIdFromObject — anyone actually does this in their app using Graph.cool? I would suppose this maps perfectly well since Graph.cool imposes a unique
    ID
    for each
    Type
    defined?
    w
    • 2
    • 2
  • p

    picosam

    06/30/2017, 8:40 AM
    @joshmadewell I may have misunderstood your question, but the above permission query ensures that only the owner of the user profile can query it. Does that do it?
    -.js
  • g

    gokaygurcan

    06/30/2017, 8:57 AM
    Hi everyone, since yesterday, I'm getting this error:
    net::ERR_SSL_PROTOCOL_ERROR
    I can't signup, login, or use any of the examples such as http://demo.learnrelay.org/
  • g

    gokaygurcan

    06/30/2017, 8:58 AM
    anyone has any idea? thanks in advance!
  • j

    jakehow

    06/30/2017, 12:53 PM
    is there a path for backing a type with data from an external service instead of the provided DB at the moment?
  • c

    chris_r

    06/30/2017, 3:29 PM
    hi there, lets say a user is sending a GraphQL query to create a new post. how can i check that he is relating the post to his user in the database and not to another user? is it possible to somehow check in the permission query wether the id of the user who send the query equals the user id inside the query he sent? or how else can it be done?
  • g

    gmuresan

    06/30/2017, 3:41 PM
    Anyone know how I can create a reusable updateOrCreate mutation. It keeps telling me the ID is required when I don’t provide an ID
    m
    • 2
    • 4
  • n

    nilan

    06/30/2017, 4:53 PM
    @Rutvik Patel I got back in the chat 🙂
    r
    a
    • 3
    • 16
  • i

    ilkkavesa

    06/30/2017, 5:08 PM
    Hi @nilan & co. In “Advanced GraphQL Features of the Graphcool API” example there are one-to-many relations: followers: [User] @relation(name: “Following”) follows: [User] @relation(name: “Following”) In Console there seems to be no way (at least I can’t figure it out) to create such syntax, in popup one-to-many doesn’t give “optional” option, and editing directly to schema doesn’t save the changes. Is that a typo, or a later change in example? Or something else? Not sure at all if this is even relevant at all, but been struggling with a really weird createuser bug… Thanks!
    n
    • 2
    • 6
  • r

    Rutvik Patel

    06/30/2017, 5:13 PM
    package_json.js
  • p

    peterp

    06/30/2017, 8:03 PM
    👋 is it possible to increase the width of the docs from 750px to something more fluid? perhaps add a button?
  • p

    peterp

    06/30/2017, 8:03 PM
1...251252253...637Latest