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

    donald

    11/09/2017, 11:03 PM
    Does anyone know what the correct way in a resolver to run a query against our graphcool instance is? I am doing the following, which used to work, but no longer seems to:
    Copy code
    import { fromEvent } from "graphcool-lib";
    
    export default async event => {
      const projectId = event.context.projectId;
      const api = fromEvent({ context: { graphcool: { projectId } } }).api(
        "simple/v1"
      );
    
      return api.request(reminderContactQuery, { reminderId }).then(result => {
        // do some stuff in here and return the result
      })
    }
    a
    t
    • 3
    • 3
  • w

    wontwon

    11/09/2017, 11:55 PM
    is anyone using graphcool currently with their iOS project?
    m
    • 2
    • 3
  • t

    Troy Sandal

    11/10/2017, 12:12 AM
    @donald You can, see https://www.npmjs.com/package/graphcool-lib
    Copy code
    import { fromEvent } from 'graphcool-lib'
     
    export default async event => {
      const lib = fromEvent(event)
      const client = lib.api('simple/v1')
      const {allUsers} = await client.request(`{allUsers{id}}`)
     
      return {
        data: {
          event: allUsers
        }
      }
    }
  • t

    Troy Sandal

    11/10/2017, 12:18 AM
    make sure you
    npm install graphcool-lib
  • d

    donald

    11/10/2017, 1:04 AM
    Thank you!
  • a

    aurnik

    11/10/2017, 1:26 AM
    Has anyone ever gotten a function error that “Query does not pass validation”? It’s saying I can’t query a field that I’m not even using in my code
  • a

    ambethia

    11/10/2017, 1:38 AM
    https://www.graph.cool/static/media/badge.10d1f6dd.svg
  • a

    ambethia

    11/10/2017, 1:39 AM
    The kerning on that is all messed up, in Firefox at least.
  • a

    ambethia

    11/10/2017, 1:40 AM
  • a

    agartha

    11/10/2017, 2:05 AM
    The font face is messed up too, not just the kerning 😄
  • m

    Matt

    11/10/2017, 2:17 AM
    I was looking at working with Puppeteer for ui automation but stumbled across chromeless. I am looking at creating a bunch of automation tests that I want to run in parallel and can do this in AWS. Chromeless mentions "Run 1000s of browser integration tests in parallel" but I couldn't find an example of this anywhere? Is there a guide/template/blog that shows multiple chromeless scripts being run in parallel?
    f
    • 2
    • 4
  • t

    Tavo

    11/10/2017, 5:11 AM
    Does anyone know if we can use fragments in the playground?
    • 1
    • 1
  • f

    fourcolors

    11/10/2017, 6:49 AM
    Hey, so I’m thinking about using graphcool as the backend for my new api.ai project. I was wondering if anyone has done anything like that? Or if there is more information I could find about creating a gateway that could interact with the requests I get from api.ai ?
  • f

    frankspin

    11/10/2017, 8:31 AM
    Hi Guys. Having a little trouble with react-apollo. I'm trying to write a query with a variable. The variable is set from localstorage. But it seems that the value from localstorage is not yet available when the query is executed.
    • 1
    • 4
  • s

    Steven Sacks

    11/10/2017, 8:40 AM
    Anyone around?
  • s

    Steven Sacks

    11/10/2017, 8:40 AM
    Copy code
    const graphcool = fromEvent(event);
        const api = graphcool.api('simple/v1');
  • s

    Steven Sacks

    11/10/2017, 8:40 AM
    I can't find the documentation on what commands are available on api
    n
    • 2
    • 3
  • v

    Vinnie

    11/10/2017, 9:04 AM
    Morning all
  • v

    Vinnie

    11/10/2017, 9:04 AM
    Looking forward to another (half a) day of learning some new stuff.
    💪 1
    🎉 1
  • s

    Slackbot

    11/10/2017, 10:02 AM
    This message was deleted.
    s
    r
    v
    • 4
    • 30
  • s

    Steven Sacks

    11/10/2017, 10:11 AM
    Anyone around that can tell me what I'm doing wrong?
  • r

    randomnerd

    11/10/2017, 10:13 AM
    perhaps something went wrong before you return the data
  • s

    Steven Sacks

    11/10/2017, 10:16 AM
    nope
  • r

    randomnerd

    11/10/2017, 10:18 AM
    attach your schema maybe
  • s

    Steven Sacks

    11/10/2017, 10:18 AM
    We should be discussing this on the above thread
  • v

    Vinnie

    11/10/2017, 10:55 AM
    Right, question of the day: I want to implement my own resolver for something I have to do. Is it possible — and if so, how — to invoke from my own resolver the resolver functions (if that’s even a thing) of other queries/mutations?
  • v

    Vinnie

    11/10/2017, 10:55 AM
    Especially of those q/m that are generated by graph.cool for CRUD on types
  • r

    randomnerd

    11/10/2017, 11:02 AM
    sure its possible
  • r

    randomnerd

    11/10/2017, 11:03 AM
    you can use graphql-request in your resolver, take a look how signup resolver works in email-password template
  • v

    Vinnie

    11/10/2017, 11:03 AM
    ah ok, by invoking the API itself
1...419420421...637Latest