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

    mcierpicki

    04/02/2018, 7:54 PM
    Can someone be nice enought to reopen this issue https://github.com/graphcool/prisma/issues/1981 ?
  • p

    pasa

    04/02/2018, 11:02 PM
    Hello everyone, I wanted to ask if there is a possibility of restricting the all-query or setting a return limit of 1 for all queries (in BaS). The reason for my question is the fact, that I am developing an application, which relinquishes authentication in the usual way and heavily uses hashs for this purpose instead. This is one of the main features of my application, so there is no way around this. But I thought about the case, that someone looks in my bundle.js and extracts the API endpoint id from it. This person could possibly read out and also manipulate every dataset like this. But to be able to use this exploit with any sense, this person would need the urlhashes, or the associated ids first.
  • p

    pasa

    04/02/2018, 11:04 PM
    If I could remove the all-query for specific types and set a fixed limit to queries for those types, I would be very happy. Is this possible at all? Thanks in advance! 🙂
  • j

    joelseq

    04/02/2018, 11:50 PM
    I’m not too sure about what exactly you are trying to implement but can you not modify the “where” part of the query to match only the url hash of the request?
  • p

    pasa

    04/02/2018, 11:52 PM
    @joelseq What do you mean by " modify the “where” part of the query to match only the url hash of the request"? I'm currently using the BaaS version of GraphCool.
  • j

    joelseq

    04/02/2018, 11:53 PM
    oh whoops nvm sorry I just assumed it was prisma
  • j

    joelseq

    04/02/2018, 11:53 PM
    i don’t have too much experience with GraphCool
  • j

    joelseq

    04/02/2018, 11:53 PM
    GraphCool’s stuff*
  • p

    pasa

    04/02/2018, 11:54 PM
    @joelseq Okay, thank you anyways! Someone at the reactiflux discord already mentioned, that this would probably only be possible with an own Graphql server.
    j
    • 2
    • 5
  • d

    digitaltopo

    04/03/2018, 1:14 AM
    Hello all, was looking for some help with AuthO integration in a react app with GraphCool. Followed this tutorial https://codeburst.io/using-auth0-with-graphcool-part-1-7b28b421c68b but get an error about the token being invalid. I understand there is a different way to do this now (using functions?) But I can't find any clear examples on it
  • h

    hamatek

    04/03/2018, 2:01 AM
    hello, does anyone knows how to see the button 'new function' on this page , i was following a tutorial which had hello function in its source code, i was hoping that by removing the hello function the button would show up but still not happening, any ideas ?
  • t

    taikn

    04/03/2018, 6:57 AM
    I've seen there was a prisma
    1.5.2
    release a few days ago, is it already available on npm? đź‘€
    n
    • 2
    • 1
  • a

    alexc

    04/03/2018, 9:07 AM
    I’ve defined a GraphCool function which I deployed with GraphCool CLI. Once I execute the mutation in React, the response error message can only be found in
    error.graphQLErrors[0].functionError.response.errors[0].message
    . Is there any reason why this message isn’t returned by default instead of the more generic
    function execution error
    ?
  • v

    Vendicto

    04/03/2018, 9:55 AM
    Hello, Do I right return the data from graphcool resolve function ? http://prntscr.com/j05tc5 I have "null" in response http://prntscr.com/j05tsr But in the response I have some data http://prntscr.com/j05u9c Thanks in advance 🍺
  • d

    drizzie

    04/03/2018, 12:10 PM
    Hey all, I am trying to deploy graphql-yoga server to Azure, and I am running into a problem with the port being an integer. It looks like a PR was created to solve this. https://github.com/graphcool/graphql-yoga/pull/237 Any idea when this will be released on npm?
  • d

    drizzie

    04/03/2018, 12:10 PM
    Actually, it looks like npm was updated 19 hours ago, corresponding with the time of the PR merge...i'll check it out
    👍 1
  • m

    Moritz

    04/03/2018, 12:48 PM
    Hi guys, how can I create a custom resolver function for a nested parameter? I have a prisma backend with some custom resolvers. Multiple data types point to another data type like so.
    Copy code
    type Image {
      id: ID! @unique
      createdAt: DateTime!
      updatedAt: DateTime!
      ...
    }
    type Story {
    id: ID! @unique
    createdAt: DateTime!
    updatedAt: DateTime!
    image: Image!
    }
    type Post {
    id: ID! @unique
    createdAt: DateTime!
    updatedAt: DateTime!
    image: Image!
    }
    Now, I will only access the
    Image
    type as a nested parameter through the other (story, post) endpoints. However, I still would like to define a custom resolver on the server side that allways is called when another resolver accesses the image to return a default image in certain cases. Where/how would I define this? Thanks! PS: When doing this only for one resolver it works fine like this:
    Copy code
    import { Context } from "../utils";
    
    export const Story = {
      image: async (parent, args, ctx: Context, info) => {
      return ...
      }
    };
    However, I would like to apply this custom resolver to all images, not just the one being called from Story.
    n
    r
    • 3
    • 2
  • m

    Moritz

    04/03/2018, 2:19 PM
    Hi all, how can I override a resolver from the generated folder?
    n
    • 2
    • 9
  • l

    lefevre

    04/03/2018, 3:40 PM
    Given the following schema:
    Copy code
    type ParentObject @model {
    id: ID! @isUnique
    child: ChildObject
    @relation(name: "ChildObjectOnParentObject")
    property1: String
    }
    
    type ChildObject @model {
    id: ID! @isUnique
    parent: ParentObject! @relation(name: "ChildObjectOnParentObject")
    property2: String
    }
    Using Graphcool framework and the relay spec, is it possible in one mutation to update property1 of the parent and it's the related childs property2 or does it have to be two seperate update mutations? 🙂
    n
    • 2
    • 1
  • s

    Soniiqaah

    04/03/2018, 4:15 PM
    Hi I get this error when Iam typing yarn start : $ GRAPHQL_ENDPOINT https://api.graph.cool/relay/v1/cjfjtv0gz1g1k0171uhwjab4r node scripts/start.js sh: GRAPHQL_ENDPOINT: command not found error An unexpected error occurred: "Command failed. Exit code: 127 Command: sh Arguments: -c GRAPHQL_ENDPOINT https://api.graph.cool/relay/v1/cjfjtv0gz1g1k0171uhwjab4r node scripts/start.js Directory: /Users/Soniiqaah/code/tictacturing Output: ". info If you think this is a bug, please open a bug report with the information provided in "/Users/Soniiqaah/code/tictacturing/yarn-error.log". info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    n
    • 2
    • 1
  • s

    Soniiqaah

    04/03/2018, 4:17 PM
    It seems it something with the GRAPH_ENDPOINT url. Can anyone help me?
  • m

    max

    04/03/2018, 5:25 PM
    for those who haven't heard, AWS Lambda now supports Node v8.10 https://aws.amazon.com/blogs/compute/node-js-8-10-runtime-now-available-in-aws-lambda/
    🦜 1
    fast parrot 2
    🎉 6
  • m

    michrob

    04/03/2018, 5:53 PM
    Hey, I have my data model setup so that I have a User, each user has a list of users they are following and a list of users that are following them. Is it possible to query whether any user is a follower of another user? Or would I have to break out those into a new Follow type?
    n
    • 2
    • 1
  • m

    michrob

    04/03/2018, 5:54 PM
    Untitled.js
  • d

    Dan Caddigan

    04/03/2018, 6:14 PM
    Does anybody know why Prisma generates TypeScript `interface`s instead of `type`s for resources? Would these make more sense as types?
    n
    • 2
    • 1
  • a

    ajmakhl

    04/03/2018, 6:34 PM
    anyone else getting an error when deploying to graphcool kinda looks like this
    Copy code
    {
      "data": {
        "push": null
      },
      "errors": [
        {
          "message": "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: eu-west-1:system:...",
          "requestId": "eu-west-1:system:...",
          "path": [
            "push"
          ],
          "locations": [
            {
              "line": 2,
              "column": 9
            }
          ]
        }
      ],
      "status": 200
    }
    n
    • 2
    • 1
  • w

    wesbos

    04/03/2018, 7:14 PM
    Hey folks - how do I access the database in middleware?
  • w

    wesbos

    04/03/2018, 7:14 PM
    https://www.graph.cool/forum/t/authentication-with-graphql-yoga-prisma-and-middleware/2285 this seems to show it using the four argument express middlware function, but when you pass express middlware 4 arguments it assumes it’s an error handler
    n
    s
    l
    • 4
    • 41
  • k

    kristiansorens

    04/03/2018, 7:17 PM
    Hey everyone! It seems like my graphcool hosted backend is crashing. I can't load the schema editor, just getting infinite loading screen. Anyone experiencing the same or know how I can get past this issue?
    n
    • 2
    • 2
  • l

    lawjolla

    04/03/2018, 9:40 PM
    Can anyone confirm that
    updateMany
    and
    deleteMany
    do not trigger subscription events?
    n
    • 2
    • 5
1...627628629...637Latest