Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.

Commit 4fd6f5c

Browse files
committed
PAIR DATA query corrected
1 parent b5f3478 commit 4fd6f5c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

graphql/queries.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,14 +246,14 @@ const allpairs = {
246246
};
247247

248248
const pairbyId = {
249-
type: pairType,
249+
type: GraphQLList(pairType),
250250
description: "Retrieves pair against id",
251251
args: {
252252
id: { type: GraphQLString }
253253
},
254254
async resolve(parent, args, context) {
255255
try {
256-
let pair = await Pair.findOne({id:args.id});
256+
let pair = await Pair.find({id:args.id});
257257
return pair;
258258

259259
} catch (error) {

graphql/types/pair.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const {
33
GraphQLID,
44
GraphQLString,
55
GraphQLInt,
6+
GraphQLFloat,
67
GraphQLOutputType
78
} = require("graphql");
89

@@ -45,7 +46,7 @@ const pairType = new GraphQLObjectType({
4546
txCount: {type: GraphQLInt},
4647

4748
// creation stats
48-
createdAtTimestamp: {type: GraphQLInt},
49+
createdAtTimestamp: {type: GraphQLFloat},
4950
createdAtBlockNumber: {type: GraphQLString},
5051

5152
// Fields used to help derived relationship

0 commit comments

Comments
 (0)