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

    Vendicto

    02/07/2018, 4:12 PM
    Guys, which Scalar Type I must to add to a file field ? for example I have
    Copy code
    type Post @model {
    id: ID! @isUnique
    createdAt: DateTime! # read-only (managed by Graphcool)
    updatedAt: DateTime! # read-only (managed by Graphcool)
    author: User! @relation(name: "UserPosts")
    description: String
    imageUrl: String
    image: <---- type ?????
    likes: Int
    }
    Who knows how to add file to GraphQl from React native ?
    p
    • 2
    • 5
  • m

    Moritz

    02/07/2018, 5:54 PM
    Hi, can someone tell me what the info variable in mutations carries, i.e. what purpose it serves? Couldnt find anything in the docs, a pointer would be appreciated.
    Copy code
    async createPost(parent, ... , ctx: Context, info) {
    n
    • 2
    • 2
  • m

    Moritz

    02/07/2018, 6:45 PM
    Hi guys, whats the easyiest way to query prisma from the server with custom attributes such as
    last
    or
    skip
    ? Example Query:
    Copy code
    const post = await ctx.db.query.posts(
            {
              where: {id: postId},
            },
            `{
             id
             text
           }`
          )
    I would like to get only the last 10 posts for performance. Whats the way to go? (Sorry, Im really not getting the hang of where to find answers to these questions in the docs)
    n
    • 2
    • 12
  • k

    Kurt DiPaolo

    02/07/2018, 7:56 PM
    Hey Guys - I’m following the auth0-authentication template tutorial (https://github.com/graphcool/templates/tree/master/auth/auth0) to try and get auth0 set up in my app and i’m getting this error and I can’t figure it out:
    The resolver function authenticate is not nullable, but the function returned null.
    Anybody have any ideas on how I could fix this?
    f
    • 2
    • 1
  • r

    rem

    02/07/2018, 9:09 PM
    I'm seeing this response based on copy/paste from the curl generated by the "generate code" on graph.cool:
    Copy code
    HTTP/1.1 400 Bad Request
    Content-Type: text/plain; charset=UTF-8
    Content-Length: 135
    Connection: keep-alive
    Date: Wed, 07 Feb 2018 21:08:19 GMT
    Server: akka-http/10.0.8
    X-Cache: Error from cloudfront
    Via: 1.1 <http://2438e1cf5c3bfe11c0519d1e8219fc1b.cloudfront.net|2438e1cf5c3bfe11c0519d1e8219fc1b.cloudfront.net> (CloudFront)
    X-Amz-Cf-Id: 4Mhb6HtHbze2u9F9opf2suoX52yVWtDTjc7C-dNjiqHxkaZaGlBfjg==
    
    The request content was malformed:
    application/x-www-form-urlencoded (of class akka.http.scaladsl.model.ContentType$WithMissingCharset)
    Is the curl request generally broken or is it possible it's something else (I'm using a valid bearer from the UI too)
  • h

    hunnuh

    02/07/2018, 10:46 PM
    I'm a little upset; after spending time trying to set up my graphcool db, I've read that now I have to migrate, and my algolia integration won't work anymore.
  • h

    hunnuh

    02/07/2018, 10:47 PM
    Am I better off with a different database with prisma on top? It seems like I've been reading for days when all I want is a searchable database that returns json objects.
  • w

    wesbos

    02/08/2018, 1:19 AM
    hey - running into an issue where I’ve created a
    User
    , then after the fact I added a new optional field
    test
    in
    datamodel.graphql
    and re-ran prisma deploy. Now when I am query any User, I get the error
    [GraphQL error]: Message: Cannot query field 'test' on type 'User'. (line 8, column 5):
    Is there something weird in that I added a field after data was created? Or is this something else?
    k
    • 2
    • 6
  • w

    wesbos

    02/08/2018, 1:22 AM
    Here is the whole erorr: http://wes.io/pNxn
  • s

    stefan

    02/08/2018, 2:22 AM
    @wesbos did you add
    test
    as a field under
    type User
    inside of
    datamodel.graphql
    , or is it defined as a new type ie
    type Test
    - I made this mistake earlier of declaring a new field as a type, and so I wasn’t able to query it in the way I wanted
    w
    • 2
    • 1
  • s

    Sam

    02/08/2018, 2:42 AM
    I'm trying to use the
    serverless-plugin-typescript
    but the build directory is not including all my
    .ts
    files, is there some option I need to enable a glob like include or something along that lines?
  • a

    Akshay

    02/08/2018, 6:30 AM
    can we do social auth like google & facebook using graphcool?
    a
    • 2
    • 5
  • a

    Akshay

    02/08/2018, 6:49 AM
    also how to setup a cron job from which we can call scheduled backed services.
  • a

    Akshay

    02/08/2018, 6:50 AM
    and pump data in graphcool
  • k

    kharioki

    02/08/2018, 8:45 AM
    Hi there, been having some issue with my apollo graphql config.options in my react native app so I am passing a
    prop
    from one screen to the other.. so on the new screen I want to use the prop passed from the other page, as a variable in my query. question is, how do I use the prop in the
    config.options
    for the query
  • h

    hvdklauw

    02/08/2018, 9:14 AM
    Hello, I have a question on how to apply filters to related items, say I have groups, the user can always get a list of all the groups, but when going through relations (news) (s)he is only allowed to do that for groups they are a member of, other groups should just give no results.
  • s

    stephenhandley

    02/08/2018, 9:35 AM
    Can anyone point me in the direction of a working example using dotenv files with
    graphcool deploy -e .env.foo
    with graphcool-framework/0.11.5 or any relevant documentation
    👍 1
    m
    • 2
    • 2
  • y

    yorunohikage

    02/08/2018, 10:22 AM
    Today we have quite a lot of errors coming from graphcool. Any ideas on what's happening? (here some failed requests eu-west-1simplecjdecix52gug30158id4pk5gd, eu-west-1simplecjdeciynkh27d0188fr7sp5sz, eu-west-1simplecjdecj1r9h2xv01648ijb7aob)
  • c

    congy

    02/08/2018, 11:13 AM
    Hey, I'm trying to log error to and external logging service in a catch block in graphcool resolver function. I'm getting error "Task timed out after 15.02 seconds". Log is sent, and I get the response from the external log service. But the graphcool function keeps running and don't finish. @nilan any ideas?
    m
    • 2
    • 5
  • j

    jmmaniego

    02/08/2018, 11:52 AM
    hi guys, (let me just drop this error here) this happens when I try to delete a File
    Copy code
    ApolloError.js:34 Uncaught (in promise) Error: GraphQL error: Whoops. Looks like an internal server error. Please contact us from the Console (<https://console.graph.cool>) or via email (support@graph.cool) and include your Request ID: us-west-2:simple:cjdefzw7787lr0102b72uke3o
        at new ApolloError (ApolloError.js:34)
        at QueryManager.js:129
        at <anonymous>
  • i

    intheclouddan

    02/08/2018, 12:12 PM
    is there a way to handle timestamps with graphql, I see datetime but not timestamp, should I change it to a string client side and send that?
    j
    • 2
    • 1
  • r

    rein

    02/08/2018, 1:54 PM
    Just checking in for a quick question, is there a Prisma data browser yet?
  • w

    wesbos

    02/08/2018, 2:03 PM
    @rein not yet - you can SSH into the docker box and then use a sql client to connect to it
    r
    n
    • 3
    • 10
  • r

    rem

    02/08/2018, 2:18 PM
    Is there a legitimate pattern whereby when a User is created, I want the creation to trigger a function that makes a new Organization for that newly created user.
  • r

    rem

    02/08/2018, 2:18 PM
    …or is that a nested mutation…?
    h
    n
    • 3
    • 4
  • w

    wesbos

    02/08/2018, 2:24 PM
    Hey folks - having an issue where I can’t add a new field in my
    datamodel.graphql
    - recorded a quick vid on it: http://wes.io/pP18 cc @nilan
    n
    n
    • 3
    • 16
  • f

    fabio1127

    02/08/2018, 4:26 PM
    Hi folks. Nice to meet you. I have a question regarding created, modified time on graph cool data
  • f

    fabio1127

    02/08/2018, 4:26 PM
    how can I generate the created and modified time when the request will be done?
    n
    • 2
    • 1
  • k

    Kimo

    02/08/2018, 4:27 PM
    I logged into Prisma cloud using my github account and my github name starts with
    O'Brian...
    so prisma tries to deploy to a cluster that starts with
    o'brian ....
    which is an invalid name and it ends up using an endpoint with the same name when binding. This causes an issue since the string is put in single quotes which means the quote in my name closes the first one. Any work around would help.
    😂 1
  • s

    spences10

    02/08/2018, 5:26 PM
    So with the standard fields you get when starting a new graphcool db
    file
    and
    user
    is user still used for auth?
1...563564565...637Latest