Skip to content

Commit

Permalink
feat(big-int): adding in big int support
Browse files Browse the repository at this point in the history
  • Loading branch information
bassrock committed Nov 12, 2024
1 parent 306f337 commit ae49fea
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 30 deletions.
39 changes: 21 additions & 18 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions servers/list-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"graphql": "16.9.0",
"graphql-constraint-directive": "5.4.2",
"graphql-depth-limit": "1.1.0",
"graphql-scalars": "^1.23.0",
"graphql-tag": "2.12.6",
"knex": "3.1.0",
"locutus": "2.0.32",
Expand Down
27 changes: 15 additions & 12 deletions servers/list-api/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ scalar ISOString

scalar Url

scalar BigInt


type SyncConflict implements BaseError {
path: String!
message: String!
Expand Down Expand Up @@ -53,19 +56,19 @@ interface RemoteEntity {
"""
Unix timestamp of when the entity was created
"""
_createdAt: Int
_createdAt: BigInt
"""
Unix timestamp of when the entity was last updated, if any property on the entity is modified this timestamp is set to the modified time
"""
_updatedAt: Int
_updatedAt: BigInt
"""
Version of the entity, this will increment with each modification of the entity's field
"""
_version: Int
"""
Unix timestamp of when the entity was deleted, 30 days after this date this entity will be HARD deleted from the database and no longer exist
"""
_deletedAt: Int
_deletedAt: BigInt
}

"""
Expand Down Expand Up @@ -182,15 +185,15 @@ type SavedItem implements RemoteEntity
"""
Timestamp that the SavedItem became favorited, null if not favorited
"""
favoritedAt: Int
favoritedAt: BigInt
"""
Helper property to indicate if the SavedItem is archived
"""
isArchived: Boolean!
"""
Timestamp that the SavedItem became archied, null if not archived
"""
archivedAt: Int
archivedAt: BigInt
"""
Link to the underlying Pocket Item for the URL
"""
Expand All @@ -214,19 +217,19 @@ type SavedItem implements RemoteEntity
"""
Unix timestamp of when the entity was created
"""
_createdAt: Int!
_createdAt: BigInt!
"""
Unix timestamp of when the entity was last updated, if any property on the entity is modified this timestamp is set to the modified time
"""
_updatedAt: Int
_updatedAt: BigInt
"""
Version of the entity, this will increment with each modification of the entity's field
"""
_version: Int
"""
Unix timestamp of when the entity was deleted, 30 days after this date this entity will be HARD deleted from the database and no longer exist
"""
_deletedAt: Int
_deletedAt: BigInt
}
enum SavedItemStatus {
ARCHIVED
Expand Down Expand Up @@ -262,7 +265,7 @@ type Tag @requiresScopes(scopes: [["ROLE_USER"]]) {
"""
Unix timestamp of when the entity was deleted, 30 days after this date this entity will be HARD deleted from the database and no longer exist
"""
_deletedAt: Int
_deletedAt: BigInt
}
"""
Input field for upserting a SavedItem
Expand All @@ -280,7 +283,7 @@ input SavedItemUpsertInput {
"""
Optional, time that request was submitted by client epoch/unix time
"""
timestamp: Int
timestamp: BigInt
"""
Optional, title of the SavedItem
"""
Expand Down Expand Up @@ -359,12 +362,12 @@ input SavedItemsFilter {
Optional, filter to get SavedItems updated since a unix timestamp.
Mutually exclusive with `updatedBefore` option.
"""
updatedSince: Int
updatedSince: BigInt
"""
Optional, filter to get SavedItems updated before a unix timestamp.
Mutually exclusive with `updatedSince` option.
"""
updatedBefore: Int
updatedBefore: BigInt
"""
Optional, filter to get SavedItems that have been favorited
"""
Expand Down
2 changes: 2 additions & 0 deletions servers/list-api/src/resolvers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ import { IContext } from '../server/context';
import { PocketDefaultScalars } from '@pocket-tools/apollo-utils';
import { GraphQLResolveInfo } from 'graphql';
import { itemIdFromSlug } from '@pocket-tools/int-mask';
import { scalarResolvers } from 'graphql-scalars';

const resolvers = {
...scalarResolvers,
...PocketDefaultScalars,
BaseError: {
__resolveType(parent: BaseError) {
Expand Down

0 comments on commit ae49fea

Please sign in to comment.