Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(big-int): adding in big int support #945

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading