Skip to content

Commit 8c970ab

Browse files
authored
Merge pull request #175 from hypercerts-org/develop
Develop
2 parents f27de92 + d5ec7c0 commit 8c970ab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+7351
-2212
lines changed

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,10 @@
2424
"commitlint": "commitlint --config commitlintrc.ts --edit"
2525
},
2626
"dependencies": {
27-
"@envelop/graphql-middleware": "^6.0.0",
2827
"@graphql-tools/merge": "^9.0.3",
2928
"@graphql-yoga/plugin-response-cache": "^3.5.0",
30-
"@hypercerts-org/marketplace-sdk": "0.3.35",
31-
"@hypercerts-org/sdk": "2.2.0-beta.2",
29+
"@hypercerts-org/marketplace-sdk": "0.3.36",
30+
"@hypercerts-org/sdk": "2.2.0-beta.3",
3231
"@ipld/car": "^5.2.5",
3332
"@openzeppelin/merkle-tree": "^1.0.5",
3433
"@sentry/integrations": "^7.114.0",

pnpm-lock.yaml

Lines changed: 94 additions & 107 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

schema.graphql

Lines changed: 141 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -252,40 +252,20 @@ input BooleanSearchOptions {
252252

253253
"""Collection of hypercerts for reference and display purposes"""
254254
type Collection {
255-
"""Address of the collection owner"""
256-
admin_id: String!
257-
258-
"""Background image of the collection"""
259-
background_image: String
255+
admins: [User!]!
260256

261257
"""Chain ID of the collection"""
262-
chain_id: EthBigInt
258+
chain_ids: [EthBigInt!]
263259

264-
"""Whether the collection should be rendered as a grayscale image"""
265-
grayscale_image: Boolean
260+
"""Creation timestamp of the collection"""
261+
created_at: String!
262+
263+
"""Description of the collection"""
264+
description: String!
266265
id: ID!
267266

268267
"""Name of the collection"""
269268
name: String!
270-
271-
"""Color of the borders of the hypercert collection"""
272-
tile_border_color: String
273-
}
274-
275-
input CollectionFetchInput {
276-
by: CollectionSortOptions
277-
}
278-
279-
input CollectionSortOptions {
280-
admin_id: SortOrder
281-
chainId: SortOrder
282-
name: SortOrder
283-
}
284-
285-
input CollectionWhereInput {
286-
admin_id: StringSearchOptions
287-
chain_id: BigIntSearchOptions
288-
id: IdSearchOptions
289269
}
290270

291271
"""Pointer to a contract deployed on a chain"""
@@ -404,11 +384,6 @@ type GetAttestationsSchemaResponse {
404384
data: [AttestationSchema!]
405385
}
406386

407-
type GetCollectionsResponse {
408-
count: Int
409-
data: [Collection!]
410-
}
411-
412387
"""Pointer to a contract deployed on a chain"""
413388
type GetContractsResponse {
414389
count: Int
@@ -421,6 +396,11 @@ type GetFractionsResponse {
421396
data: [Fraction!]
422397
}
423398

399+
type GetHyperboardsResponse {
400+
count: Int
401+
data: [Hyperboard!]
402+
}
403+
424404
"""
425405
Hypercert with metadata, contract, orders, sales and fraction information
426406
"""
@@ -451,6 +431,49 @@ type GetSalesResponse {
451431
data: [Sale!]
452432
}
453433

434+
type GetUsersResponse {
435+
count: Int
436+
data: [User!]
437+
}
438+
439+
"""Hyperboard of hypercerts for reference and display purposes"""
440+
type Hyperboard {
441+
admins: [User!]!
442+
443+
"""Background image of the hyperboard"""
444+
background_image: String
445+
446+
"""Chain ID of the hyperboard"""
447+
chain_ids: [EthBigInt!]
448+
449+
"""Whether the hyperboard should be rendered as a grayscale image"""
450+
grayscale_images: Boolean
451+
id: ID!
452+
453+
"""Name of the hyperboard"""
454+
name: String!
455+
sections: SectionResponseType!
456+
457+
"""Color of the borders of the hyperboard"""
458+
tile_border_color: String
459+
}
460+
461+
input HyperboardFetchInput {
462+
by: HyperboardSortOptions
463+
}
464+
465+
input HyperboardSortOptions {
466+
admin_id: SortOrder
467+
chainId: SortOrder
468+
name: SortOrder
469+
}
470+
471+
input HyperboardWhereInput {
472+
admin_id: StringSearchOptions
473+
chain_id: BigIntSearchOptions
474+
id: IdSearchOptions
475+
}
476+
454477
"""
455478
Hypercert with metadata, contract, orders, sales and fraction information
456479
"""
@@ -673,7 +696,11 @@ input MetadataWhereInput {
673696
}
674697

675698
input NumberArraySearchOptions {
699+
"""Array of numbers"""
676700
contains: [BigInt!]
701+
702+
"""Array of numbers"""
703+
overlaps: [BigInt!]
677704
}
678705

679706
input NumberSearchOptions {
@@ -748,13 +775,14 @@ type Query {
748775
allowlistRecords(first: Int, offset: Int, sort: AllowlistRecordFetchInput, where: AllowlistRecordWhereInput): GetAllowlistRecordResponse!
749776
attestationSchemas(first: Int, offset: Int): GetAttestationsSchemaResponse!
750777
attestations(first: Int, offset: Int, sort: AttestationFetchInput, where: AttestationWhereInput): GetAttestationsResponse!
751-
collections(first: Int, offset: Int, sort: CollectionFetchInput, where: CollectionWhereInput): GetCollectionsResponse!
752778
contracts(first: Int, offset: Int, sort: ContractFetchInput, where: ContractWhereInput): GetContractsResponse!
753779
fractions(first: Int, offset: Int, sort: FractionFetchInput, where: FractionWhereInput): GetFractionsResponse!
780+
hyperboards(first: Int, offset: Int, sort: HyperboardFetchInput, where: HyperboardWhereInput): GetHyperboardsResponse!
754781
hypercerts(first: Int, offset: Int, sort: HypercertFetchInput, where: HypercertsWhereArgs): GetHypercertsResponse!
755782
metadata(first: Int, offset: Int, sort: MetadataFetchInput, where: MetadataWhereInput): GetMetadataResponse!
756783
orders(first: Int, offset: Int, sort: OrderFetchInput, where: OrderWhereInput): GetOrdersResponse!
757784
sales(first: Int, offset: Int, sort: SaleFetchInput, where: SaleWhereInput): GetSalesResponse!
785+
users(first: Int, offset: Int, where: UserWhereInput): GetUsersResponse!
758786
}
759787

760788
type Sale {
@@ -827,6 +855,65 @@ input SaleWhereInput {
827855
transaction_hash: IdSearchOptions
828856
}
829857

858+
"""Section representing a collection within a hyperboard"""
859+
type Section {
860+
collection: Collection!
861+
entries: [SectionEntry!]!
862+
label: String!
863+
owners: [SectionOwner!]!
864+
}
865+
866+
"""Entry representing a hypercert or blueprint within a section"""
867+
type SectionEntry {
868+
display_size: Float!
869+
870+
"""ID of the hypercert or blueprint"""
871+
id: String!
872+
is_blueprint: Boolean!
873+
874+
"""Name of the hypercert or blueprint"""
875+
name: String
876+
owners: [SectionEntryOwner!]!
877+
percentage_of_section: Float!
878+
total_units: BigInt
879+
}
880+
881+
type SectionEntryOwner {
882+
"""The address of the user"""
883+
address: String!
884+
885+
"""The avatar of the user"""
886+
avatar: String
887+
888+
"""The chain ID of the user"""
889+
chain_id: EthBigInt
890+
891+
"""The display name of the user"""
892+
display_name: String
893+
percentage: Float!
894+
units: BigInt
895+
}
896+
897+
type SectionOwner {
898+
"""The address of the user"""
899+
address: String!
900+
901+
"""The avatar of the user"""
902+
avatar: String
903+
904+
"""The chain ID of the user"""
905+
chain_id: EthBigInt
906+
907+
"""The display name of the user"""
908+
display_name: String
909+
percentage_owned: Float!
910+
}
911+
912+
type SectionResponseType {
913+
count: Float!
914+
data: [Section!]!
915+
}
916+
830917
"""The direction to sort the query results"""
831918
enum SortOrder {
832919
"""Ascending order"""
@@ -838,6 +925,7 @@ enum SortOrder {
838925

839926
input StringArraySearchOptions {
840927
contains: [String!]
928+
overlaps: [String!]
841929
}
842930

843931
input StringSearchOptions {
@@ -850,4 +938,23 @@ input StringSearchOptions {
850938
"""
851939
A field whose value is a generic Universally Unique Identifier: https://en.wikipedia.org/wiki/Universally_unique_identifier.
852940
"""
853-
scalar UUID
941+
scalar UUID
942+
943+
type User {
944+
"""The address of the user"""
945+
address: String!
946+
947+
"""The avatar of the user"""
948+
avatar: String
949+
950+
"""The chain ID of the user"""
951+
chain_id: EthBigInt
952+
953+
"""The display name of the user"""
954+
display_name: String
955+
}
956+
957+
input UserWhereInput {
958+
address: StringSearchOptions
959+
chain_id: BigIntSearchOptions
960+
}

0 commit comments

Comments
 (0)