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

    Saeris

    12/13/2017, 12:15 AM
    I'm trying to build an input type for a filtering argument
  • s

    Saeris

    12/13/2017, 12:16 AM
    right now what I've been doing to implement a
    Range
    input is to have 4 fields:
    value
    ,
    min
    ,
    max
    , and
    operator
  • s

    Saeris

    12/13/2017, 12:17 AM
    the way you use
    Range
    is you either supply a
    value
    plus an optional
    operator
    (operator defaults to
    =
    )
  • s

    Saeris

    12/13/2017, 12:17 AM
    or you supply a
    min
    and a
    max
  • s

    Saeris

    12/13/2017, 12:18 AM
    what I would like to do is have this input, through the schema itself, enforce a rule that you can only use one combination or the other
  • s

    Saeris

    12/13/2017, 12:18 AM
    think of it as if you'd have a
    comparison
    enum, where you have two values, which are the two inputs
  • s

    Saeris

    12/13/2017, 12:19 AM
    enums restrict you to a pre-defined list of options
  • s

    Saeris

    12/13/2017, 12:20 AM
    I'd like to have the same to restrict the available input types you can choose
  • s

    Saeris

    12/13/2017, 12:20 AM
    but I don't think there's currently a way to enforce this on a schema level
  • s

    Saeris

    12/13/2017, 12:20 AM
    any ideas?
  • s

    Saeris

    12/13/2017, 12:26 AM
    my naming here is a bit confusing, so maybe this is better: I have a
    where
    field that I want to either be a
    range
    (
    min
    ,
    max
    ) or
    comparison
    (
    value
    ,
    operator
    )
  • s

    Saeris

    12/13/2017, 12:28 AM
    and we can refer to this concept as "enumerated inputs"
  • s

    Saeris

    12/13/2017, 12:34 AM
    hmm, may have answered my own question, seems a bunch of people want to use Unions with Input types to accomplish this, but it is indeed not yet supported I guess
  • s

    Saeris

    12/13/2017, 12:34 AM
    https://github.com/graphql/graphql-js/issues/207
  • k

    kaihuang724

    12/13/2017, 12:36 AM
    Does anyone know if it’s possible to have an array of boolean values?
  • k

    kaihuang724

    12/13/2017, 12:36 AM
    Such as:
    [true, true, false]
  • s

    Saeris

    12/13/2017, 12:39 AM
    I don't see why not
  • k

    kaihuang724

    12/13/2017, 12:40 AM
    Copy code
    mutation {
      updateField(
        id: "id",
        booleanArray: [false, false, true]
      ) {
        booleanArray
      }
    }
  • k

    kaihuang724

    12/13/2017, 12:41 AM
    Hm, I’m not sure how to mutate the values - this doesn’t seem to work
  • s

    Saeris

    12/13/2017, 12:41 AM
    easiest way to check is on an existing schema, just add
    [Boolean]
    or
    new GraphQLList(GraphQLBoolean)
    as an argument to a query, see if your server throws an error on schema generation
  • k

    kaihuang724

    12/13/2017, 1:00 AM
    Got it - I think my schema wasn’t updated momentarily
  • m

    mattbryanswan

    12/13/2017, 1:04 AM
    I set up the Amazon SES template and added my credentials. I run the provided mutation (with valid email addresses) and I get an unhandled error with this text:
    "error": "Function returned invalid status code: 0. Raw body: empty.last"
    sounds pretty ominous. Any ideas on how to resolve?
    i
    • 2
    • 4
  • t

    taizo

    12/13/2017, 5:32 AM
    I recognized that a Graphcool framework docker image includes a MySQL system. Can I use external MySQL server like Amazon RDS with Graphcool framework?
    i
    • 2
    • 6
  • l

    lkbr

    12/13/2017, 8:31 AM
    Hello, the functions tab in the console is not loading again. Getting 504 timeouts.
    n
    • 2
    • 1
  • h

    hungvu

    12/13/2017, 8:42 AM
    Hi everyone, I have error "yarn run v1.3.2 error Command "start" not found. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command." when run command "yarn start" following https://github.com/graphcool-examples/react-graphql/blob/master/quickstart-with-apollo/README.md Please help me!
    d
    n
    • 3
    • 8
  • a

    AsPrO

    12/13/2017, 8:49 AM
    Hello, can someone tell me why my graphcool console is not complete ? I don't see the "Integration" tab which seems to be included in the free version as well. This is to use Algolia
    i
    • 2
    • 2
  • g

    go4cas

    12/13/2017, 1:47 PM
    Hey guys ... can I use the GraphCool Framework with an existing data source? (e.g. I have relational data in MySQL and MS SQL, and a third-party app with a ReST API). I want to use the framework to build a GraphQL API on top of these data sources. Is this possible?
  • m

    max

    12/13/2017, 2:08 PM
    does any have a view on Typescript vs JS ES6 for the Graphcool serverless functions? I've seen many of the official templates are in TS
    s
    a
    i
    • 4
    • 25
  • m

    max

    12/13/2017, 4:09 PM
    Does anyone know about [TypeScript] Checking event.context.auth when you’re also defining EventData? https://www.graph.cool/forum/t/typescript-checking-event-context-auth-when-youre-also-defining-eventdata/1878
  • r

    roderik

    12/13/2017, 5:58 PM
    i wat going trough this tutorial https://www.graph.cool/docs/reference/auth/authorization/permission-queries-iox3aqu0ee/
1...468469470...637Latest