im using graph.cool console
# prisma-whats-new
k
im using graph.cool console
h
so you are using old one? stick to thread pls
k
sorry. What do you mean by old one?
h
functions defined in console
k
just made a new function and added a bit of my logic to test stuff out
but yeah defined in console
h
btw you should not pass auth token here 😄
k
yeah
h
so delete it 😄
k
pasted the snippet before I think 😄
any idea why the fetch does not work its literally pasted from code generator
h
if you copied whole function there was missing c in the beginning what i saw on first glance
looks alright to me
h
I didn't work with old functions, so sadly i can't help you :X sorry, but i think you should return event with changed data, that is how it works in current state
k
thanks no problem! Without the fetch it works correctly and returns correct values
but thanks ill dig deeper 😄
h
in current version you can do something like this:
Copy code
const lib = fromEvent(event)
  const client = lib.api('simple/v1')

  const { allPosts } = await client.request(postQuery, {
    title: event.data.title
  })
k
ok,
can you explain me
what do you mean by old functions and new?
is there a new version?
h
old functions where defined in console, newer version have functions defined in files, and framework 1.0 will use resolvers for this purpose
if you are still in development maybe try to migrate to 1.0
k
great info thanks