Skip to content

Commit

Permalink
scalars
Browse files Browse the repository at this point in the history
  • Loading branch information
saihaj committed Feb 23, 2024
1 parent b2e122c commit 1be1651
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 deletions.
1 change: 1 addition & 0 deletions packages/indexer-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"express": "4.18.2",
"fastify": "3.25.0",
"graphql": "16.8.0",
"graphql-scalars": "^1.22.5",
"graphql-tag": "2.12.6",
"graphql-yoga": "^5.1.1",
"jayson": "3.6.6",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
import { GraphQLScalarType } from 'graphql'
export const BigInt = new GraphQLScalarType({
name: 'BigInt',
description: 'BigInt description',
serialize: (value) => {
/* Implement logic to turn the returned value from resolvers to a value that can be sent to clients */
},
parseValue: (value) => {
/* Implement logic to parse input that was sent to the server as variables */
},
parseLiteral: (ast) => {
/* Implement logic to parse input that was sent to the server as literal values (string, number, or boolean) */
},
})
import { BigIntResolver } from 'graphql-scalars'

export const BigInt = BigIntResolver
7 changes: 7 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8112,6 +8112,13 @@ graphql-request@^6.0.0:
"@graphql-typed-document-node/core" "^3.2.0"
cross-fetch "^3.1.5"

graphql-scalars@^1.22.5:
version "1.22.5"
resolved "https://registry.yarnpkg.com/graphql-scalars/-/graphql-scalars-1.22.5.tgz#f7aceacf0efd2f38d53635c69895e3c67c04bd37"
integrity sha512-Mw7uaqRscjdaXmxlHbt3sYGLU8o1hfFvTvN2VRrYEJyEPy6zGIbaFyJ4PPyt9H6GRHp01MQwS6HqXroRYHyGOg==
dependencies:
tslib "^2.5.0"

[email protected], graphql-tag@^2.11.0, graphql-tag@^2.12.3:
version "2.12.6"
resolved "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.12.6.tgz"
Expand Down

0 comments on commit 1be1651

Please sign in to comment.