Commit af7d021d authored by Diogo Dutra's avatar Diogo Dutra Committed by Tim Neutkens

Fix relay modern server express example (#8683)

parent 8444c1ff
module.exports = {
id: 'viewer',
blogPosts: [
{
id: 'p1',
......
const gqr = require('graphql-relay')
const db = require('./db')
const viewer = variables => ({
id: db.id,
allBlogPosts: gqr.connectionFromArray(db.blogPosts, variables)
})
......
......@@ -3,7 +3,8 @@ type Query {
node(id: ID!): Node
}
type Viewer {
type Viewer implements Node {
id: ID!
allBlogPosts(after: String, before: String, first: Int, last: Int): BlogPostConnection!
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment