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

    joshmadewell

    07/05/2017, 2:44 AM
    We have users who are one to many on user settings and the id of every user using a setting is stored on the setting in any array
  • j

    joshmadewell

    07/05/2017, 2:44 AM
    It could be a visual thing instead of a data thing though
    w
    • 2
    • 2
  • p

    phil

    07/05/2017, 2:49 AM
    Is there a video of @sorenbs talk from the Europe conference? https://graphql-europe.org/schedule/schema-first-development
    n
    s
    • 3
    • 5
  • d

    davo

    07/05/2017, 2:57 AM
    @joshmadewell I found this googling
    Copy code
    A one-to-many relationship is a relationship where a parent record can be linked to many children. For example, a user can be an author of many stories. In our SQL database it means the Story table will have an author column, storing an id of a User as a foreign key. The User table will not need to store any references to stories in the SQL schema.
    
    However in the GraphQL schema, Story will have an author field of type User and User will have stories. This allows queries to follow relationships (connections) from both sides, regardless of the underlying SQL schema. The way the data is stored and represented in the database is an implementation detail.
  • d

    davo

    07/05/2017, 2:58 AM
    if thats the same in graph.cool, that’s ok I guess. but I wonder if there’s a char limit for the field
    Car.wheels
    that I may hit in my example
  • j

    joshmadewell

    07/05/2017, 3:03 AM
    ahh that makes total sense
  • j

    joshmadewell

    07/05/2017, 3:03 AM
    but still a valid concern about the size of that data
  • d

    davo

    07/05/2017, 3:12 AM
    yeah it’d be good if we can get an estimate on size limit. Update: Looks like its around
    280,403 chars
    so if new id adds 29 chars
    "id",
    that’ll give around 9.6k records. If I did a player (one) to statEvent (many) relationship. Russell Westbrook would hit the size limit in 2seasons as I estimate he did 8.5k statEvents this season (e.g. Points, Assist, Steals, Blocks)
    j
    n
    • 3
    • 22
  • a

    auser

    07/05/2017, 3:34 AM
    hey all — sooo… I have a design question wrt graphcool and stripe integration — would this be the spot to ask it?
    n
    • 2
    • 1
  • a

    auser

    07/05/2017, 4:35 AM
    😦

    http://d.pr/i/pnJUa3.png▾

    when trying to create a subscription
    n
    • 2
    • 1
  • a

    auser

    07/05/2017, 4:55 AM
    guess nobody is there
  • a

    amithkr

    07/05/2017, 8:47 AM
    Whoops. Looks like an internal server error. Please contact us in Slack (https://slack.graph.cool) and send us your Request ID: cj4qrekrf1k5v019618n9p0jg
    n
    • 2
    • 1
  • a

    amithkr

    07/05/2017, 8:47 AM
    can any help me out ...! i am getting this issue when i toggle off a function
    n
    • 2
    • 1
  • a

    amithkr

    07/05/2017, 8:48 AM
    and my changes are not been saved ...!
    n
    • 2
    • 12
  • a

    ajmakhl

    07/05/2017, 11:34 AM
    I am trying to make a user profile page for my app with react native. The UserType contains {email, username, password, age}. {age} is an [optional] field. When I try to query a User that doesn’t have {age} field... I get an error saying “age not defined”. I am planning to have more {...fields} later on. How can I battle this issue? I was thinking of making if (!age) { ... } but then I will need to do that for all of the optional fields?
    n
    • 2
    • 16
  • s

    Slackbot

    07/05/2017, 3:47 PM
    This message was deleted.
    n
    m
    • 3
    • 5
  • m

    mentallyretired

    07/05/2017, 4:17 PM
    I reposted my issue on the discussion boards, as requested. 🙂 https://www.graph.cool/forum/t/confusing-error-message-on-one-to-many-update/308
  • a

    auser

    07/05/2017, 4:38 PM
    okay, so my stripe integration question goes a little like this
  • a

    auser

    07/05/2017, 4:39 PM
    I want to retrieve the saved cards for a particular customer on Stripe. In order to do this, I have to use a back-end server, but would prefer to do it through graphql. Would you use post-processing SSR to handle fetching a stripe customer?
  • a

    auser

    07/05/2017, 4:48 PM
    or should I be barking up a different tree?
    a
    • 2
    • 5
  • a

    agartha

    07/05/2017, 5:20 PM
    Q: I read somewhere that doing a count automatically groups on the result of the result fields. Is that correct, or did I misinterpret something?
    ❓ 1
    n
    • 2
    • 7
  • p

    peterp

    07/05/2017, 7:12 PM
    Can I create deeply nested mutations?
    n
    • 2
    • 7
  • p

    peterp

    07/05/2017, 7:12 PM
    More than just one to many?
  • p

    peterp

    07/05/2017, 7:12 PM
    Author -> posts -> tags?
  • p

    peterp

    07/05/2017, 7:12 PM
    reading through this https://www.graph.cool/docs/reference/simple-api/nested-create-mutations-vaet3eengo/
  • j

    jony

    07/05/2017, 7:35 PM
    are we using propTypes when using Apollo?
    • 1
    • 1
  • j

    jony

    07/05/2017, 7:36 PM
    I just tried and got some errors but found this:
  • j

    jony

    07/05/2017, 7:36 PM
    `const doc = gql`query { ... }`; X.propTypes = { data: propType(doc).isRequired, };`
  • j

    jony

    07/05/2017, 7:36 PM
    on https://github.com/apollographql/graphql-anywhere
  • m

    martin

    07/05/2017, 7:38 PM
    Wondering if I could receive some crowdsourced assistance for a
    query
    . How would one query
    Connections
    for current
    user
    where either
    user
    has not blocked the
    connection
    or vice versa? Here’s the simplified schema:
    Copy code
    type User implements Node {
      id: ID! @isUnique
      blockTarget: [Blocks!]! @relation(name: "BlockTargetToUser")
      blockSource: [Blocks!]! @relation(name: "BlockSourceToUser")
    }
    type Connections implements Node {
      id: ID! @isUnique
      source: User @relation(name: "ConnectionSourceToUser")
      target: User @relation(name: "ConnectionTargetToUser")
    }
    type Blocks implements Node {
      id: ID! @isUnique
      source: User @relation(name: "BlockSourceToUser")
      target: User @relation(name: "BlockTargetToUser")
    }
    Currently, the
    query
    for finding connections for each user doesn’t consider which user blocked whom:
    Copy code
    {
      allConnectionses(filter: {
        OR: [
          { source: { id: userId } },
          { target: { id: userId } }
        ]
      }) {
        id
        source {
          id
        }
        target {
          id
        }
      }
    }
    a
    • 2
    • 17
1...256257258...637Latest