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

    jspr

    09/19/2017, 12:02 AM
    Hi, running into a problem setting up graphcool following the instructions on https://github.com/graphcool-examples/react-graphql/tree/master/quickstart-with-apollo After "graphcool init --schema https://graphqlbin.com/instagram.graphql", the response is "The schema is invalid: All models must specify the
    id
    field: `id: ID! @isUnique`" The instagram.graphql schema is "type Post { description: String! imageUrl: String! }
    n
    • 2
    • 2
  • j

    jspr

    09/19/2017, 12:36 AM
    Same error response with "graphcool init --schema https://graphqlbin.com/worldchat.graphql" ("The schema is invalid: All models must specify the
    id
    field: `id: ID! @isUnique`") Using graphcool 1.3.7.
  • d

    devan

    09/19/2017, 12:57 AM
    @jspr That is a known bug that the awesome Graphcool team is working to resolve quickly. It was reported a few hours ago.
  • j

    jspr

    09/19/2017, 1:00 AM
    @devan great, thanks! i'll try again in a couple of hours.
  • d

    devan

    09/19/2017, 1:01 AM
    @jspr Most of the team is located in Germany, so it’s early morning over there right now. It looks like you are on EST, so I’d say ask again in the morning 🙂
  • j

    jspr

    09/19/2017, 1:04 AM
    @devan Ah, okay. Thanks. I'll check again tomorrow.
  • b

    be4r

    09/19/2017, 1:43 AM
    i am using Auth0 for authentication. My container component
    App
    is a
    graphql
    HOC that quereis the user and passes the
    user
    as a prop to
    ChildComponent
    . The
    ChildComponent
    is also a
    graphql
    HOC that uses the
    user
    prop as a variable. However, when I render server side, I get an error saying that
    user
    is undefined. How can I go about checking the authentication state on the server side and passing down the
    user
    props to the
    ChildComponent
    from the server?
  • z

    zaksingh

    09/19/2017, 2:17 AM
    I'm getting
    No 'Access-Control-Allow-Origin' header is present on the requested resource
    upon trying to use
    fetch
    to upload a file
  • m

    matty

    09/19/2017, 3:15 AM
    @zaksingh that's usually a red herring... the real error might be that you are uploading with the wrong headers
  • m

    matty

    09/19/2017, 3:19 AM
    Copy code
    const body = new global.FormData()
          body.append('data', file)
          const res = await fetch(GRAPHCOOL_FILE_ENDPOINT, {
            method: 'POST',
            body,
          })
    z
    • 2
    • 3
  • m

    matty

    09/19/2017, 3:19 AM
    @be4r - when the user authenticates with auth0, you should receive an "ID token" from them
  • m

    matty

    09/19/2017, 3:20 AM
    Use this recipe to send the token with your graphcool request: http://dev.apollodata.com/react/auth.html
    b
    • 2
    • 5
  • p

    plarson

    09/19/2017, 3:50 AM
    is there any control over the argument names for automatically generated mutations?
    n
    • 2
    • 1
  • m

    matty

    09/19/2017, 3:55 AM
    sa excited to use the new CLI 🎉
    💯 1
  • m

    matty

    09/19/2017, 3:55 AM
    @plarson - there is none unfortunately, however you can use Schema Extensions (available in the Beta) to add new queries & mutations. What did you have in mind?
  • p

    plarson

    09/19/2017, 3:56 AM
    All good, was just wondering if this could look nicer:
  • p

    plarson

    09/19/2017, 3:57 AM
    -.txt
  • p

    plarson

    09/19/2017, 4:00 AM
    A way to do upserts or nested create mutations that do upserts would be nice as well
  • m

    matty

    09/19/2017, 4:01 AM
    upserts are supported but not documented as I think they have some breaking changes on the way
  • m

    matty

    09/19/2017, 4:01 AM
    nested creates should work though
  • m

    matty

    09/19/2017, 4:01 AM
    https://www.graph.cool/docs/reference/simple-api/nested-create-mutations-vaet3eengo/
  • m

    matty

    09/19/2017, 4:01 AM
    you might want to spend some time exploring the schema generated by graphcool - to do this, login and open up the playground, then click the 'Docs' tab on the right hand side
  • p

    plarson

    09/19/2017, 4:08 AM
    I’m on the beta using the CLI, is there a way to share code at all?
  • m

    matty

    09/19/2017, 4:13 AM
    https://www.graph.cool/forum/t/feedback-new-cli-beta/949/5
  • m

    matty

    09/19/2017, 4:13 AM
    there are some questions at the bottom there you might find helpful
  • p

    plarson

    09/19/2017, 4:51 AM
    thanks
  • p

    proteus

    09/19/2017, 7:40 AM
    Is there a way to get in on the beta for schema extensions without sending a PM to @nilan?
  • p

    proteus

    09/19/2017, 7:40 AM
    The forum won’t let me PM anyone as a new user.
  • p

    proteus

    09/19/2017, 7:41 AM
    This is starting to get really frustrating.
  • p

    proteus

    09/19/2017, 7:53 AM
    You cannot document beta features that are not available to everyone.
1...343344345...637Latest