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

    phil

    01/16/2017, 9:10 AM
    Copy code
    mutation CreateTeamAndMember {
      createTeam(name: "My Team", members: [{ userId: "cixxvdfjydsja0137xu2efklp" }]) {
        id
        members {
          id
          team {
            id
          }
          user {
            id
            email
          }
        }
      }
    }
  • p

    phil

    01/16/2017, 9:10 AM
    Produces:
  • p

    phil

    01/16/2017, 9:10 AM
    Copy code
    {
      "data": {
        "createTeam": {
          "id": "cixzvd36h73df01343oncu0e9",
          "members": [
            {
              "id": "cixzvd36i73di0134z528wvk5",
              "team": {
                "id": "cixzvd36h73df01343oncu0e9"
              },
              "user": null
            }
          ]
        }
      }
    }
  • p

    phil

    01/16/2017, 9:10 AM
    the user is
    null
  • n

    nilan

    01/16/2017, 9:11 AM
    is there a user with that id?
  • p

    phil

    01/16/2017, 9:12 AM
    yes, that user exists
  • p

    phil

    01/16/2017, 9:13 AM
    The
    TeamMembership
    schema looks like this:
  • p

    phil

    01/16/2017, 9:13 AM
  • n

    nilan

    01/16/2017, 9:15 AM
    hey @phil, can we continue in PM? ๐Ÿ™‚
  • p

    phil

    01/16/2017, 9:16 AM
    sure - thanks
  • k

    karol.wons

    01/16/2017, 9:19 AM
    hi there! I have a question to exercise 5: why do we need
    static fragments = {...}
    in
    CreatePokemonMutation
    ? this mutation works perfectly fine without it (and without adding this fragment into
    PokemonPage
    container). I'm just curious ๐Ÿ™‚ btw. it's a great tutorial !!! really helped me with understanding relay concept ๐Ÿ‘
  • n

    nilan

    01/16/2017, 9:23 AM
    hey @karol.wons ๐Ÿ™‚ You can read more about the
    static fragments
    thing here: https://facebook.github.io/relay/docs/api-reference-relay-mutation.html#fragments-static-property
  • n

    nilan

    01/16/2017, 9:24 AM
    in this particular case, you don't need it. you might depend on some data for your
    optimisticResponse
    for example, then you can define them with
    static fragments
    ๐Ÿ™‚
  • k

    karol.wons

    01/16/2017, 9:25 AM
    ok, thanks! I'll read the docs
    ๐Ÿ“ƒ 1
  • p

    peeter

    01/16/2017, 3:33 PM
    Hello
  • n

    nilan

    01/16/2017, 3:33 PM
    Hi @peeter ๐Ÿ‘‹
  • p

    peeter

    01/16/2017, 3:34 PM
    Does the global root field "viewer" require a globalId? I'm running into problems with Mutations + RANGE_ADD and with Pagination
  • p

    peeter

    01/16/2017, 3:34 PM
    If I add a globalIdField to my viewer node, pagination wont work.
  • p

    peeter

    01/16/2017, 3:34 PM
    If I don't add a globalIdField, pagination works but Mutations with RANGE_ADD do not
  • p

    peeter

    01/16/2017, 3:35 PM
    The node itself is added, but is not added to my viewer node's connection
  • n

    nilan

    01/16/2017, 3:36 PM
    let's discuss this in #learnrelay ๐Ÿ™‚
  • p

    peeter

    01/16/2017, 3:36 PM
    Alrighty, joined.
  • g

    gopidon

    01/16/2017, 6:49 PM
    Do we have simple api to upload a file? I see only curl way of doin it
  • n

    nilan

    01/16/2017, 6:50 PM
    At the moment, you can only upload files using the file API. We are already working on integrating it in the Simple API and Relay API ๐Ÿ™‚
  • s

    sdubois

    01/16/2017, 7:09 PM
    And a drag-n-drop option from the console could be handy too ๐Ÿ˜›
  • n

    nilan

    01/16/2017, 7:20 PM
    Thanks, added a feature request: https://github.com/graphcool/feature-requests/issues/66 ๐Ÿ™‚
    ๐Ÿ™Œ 3
  • m

    martin

    01/17/2017, 1:44 AM
    Tried to create a new
    graph.cool
    account registering with my company email, but upon login received the following error message:
    Copy code
    Whoops. Looks like an internal server error. Please contact us in Slack (<https://slack.graph.cool>) and send us your Request ID: ciy0uvgrf05bj0196i1ggp4ir
    Possibly because I also have another
    graph.cool
    account through my GitHub and once also had had my company email associated to it.
  • m

    malone

    01/17/2017, 2:24 AM
    Hey everyone, hoping for some advice here: Iโ€™m trying to create โ€œcommunitiesโ€ based on the userโ€™s email address. (i.e. john@example.com would be in the
    <http://example.com|example.com>
    community) Is there an easy way to do this with graph.cool, or should I try and figure something else out with Auth0?
  • m

    monkeybonkey

    01/17/2017, 3:10 AM
    this might be a simple question but how do you do paging in the graphql query? looking at the playground it seems to cut off at 1000 records
  • m

    monkeybonkey

    01/17/2017, 3:11 AM
    @malone what are the features/properties of a community? for instance you could just create a communities table/model and then associate users to a community
1...767778...637Latest