is it not possible to add an optional before param...
# prisma-whats-new
r
is it not possible to add an optional before parameter in a query? When I try to add one as type ID and pass in null in some queries, I get an error.
a
You should be able to pass null, what's the error?
This query for example, works:
Copy code
query{
  allPosts(before: null) { id }
}
r
Im trying to do this
Copy code
export const FETCH_PROFILE_UPDATES = gql`
  query($id: ID!, $offset: Int = 0, $before: ID) {
and when I then pass null since in some cases I dont need a before
it gives an error
a
Before is a String
Not an ID
r
I see
okey
im gonna try that
a
This works:

https://snag.gy/yieDfZ.jpg

If you change that to ID, the error message is actually pretty self-explanatory:

https://snag.gy/ExhqVQ.jpg

r
The error I got in ios simulator was a huge apollo error
which I could make heads nor tails of
but Ill try this
a
That's why I always try my queries in the Playground