diff --git a/api/resolvers.js b/api/resolvers.js index b25f3c1..ef087e8 100644 --- a/api/resolvers.js +++ b/api/resolvers.js @@ -9,8 +9,9 @@ const getNewVal = (result) => { export default { Query: { - ignore () { - return null + async allUploads () { + const db = getRethinkDB() + return await db.table('uploads') } }, Mutation: { diff --git a/api/schema.graphql b/api/schema.graphql index 6abdeeb..b58727d 100644 --- a/api/schema.graphql +++ b/api/schema.graphql @@ -13,8 +13,7 @@ input Upload { } type Query { - # GraphQL will not work without defining a query. - ignore: Boolean + allUploads: [File] } type Mutation {