From f4f3aa3d9249c1cab9eb6add42a9c41977b312a0 Mon Sep 17 00:00:00 2001 From: cgeek <cem.moreau@gmail.com> Date: Tue, 21 May 2019 18:35:36 +0200 Subject: [PATCH] [fix] Update GraphQL schema in tests --- back/tests/schema-test.ts | 25 +++++++++++++++++++++++++ back/webmin/graphql/types/BlockType.ts | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/back/tests/schema-test.ts b/back/tests/schema-test.ts index 9380234..c888926 100644 --- a/back/tests/schema-test.ts +++ b/back/tests/schema-test.ts @@ -69,6 +69,10 @@ type BlockType { written_on: String } +type ChainType { + blocks: [BlockType!]! +} + type DocumentsType { blocks: [BlockType!]! identities: [PendingIdentityType!]! @@ -81,6 +85,21 @@ type DocumentsType { ws2pDisconnections: [WS2PDisconnectionType!]! } +type HistoryOfMemberType { + stories: [String!]! +} + +type NetworkConfAvailableType { + remoteport: Float! + remotehost: String + remoteipv4: String + remoteipv6: String + port: Float! + ipv4: String! + ipv6: String! + upnp: Boolean! +} + type P2PDataCandidateType { reserved: Boolean nbSuccess: Int @@ -201,6 +220,12 @@ type Query { startNode: Boolean! synchronize(url: String!): Boolean uid(pub: String!): String + getConf: String! + testAndSaveConf(conf: String!): String! + getMainChain(end: Int!, start: Int!): ChainType! + historyOfMember(pub: String!): HistoryOfMemberType! + getForks(end: Int!, start: Int!): ChainType! + getAvailableNetworkConf: NetworkConfAvailableType! } type SoftVersionType { diff --git a/back/webmin/graphql/types/BlockType.ts b/back/webmin/graphql/types/BlockType.ts index 8b0d939..8bd7c0d 100644 --- a/back/webmin/graphql/types/BlockType.ts +++ b/back/webmin/graphql/types/BlockType.ts @@ -28,7 +28,7 @@ export class BlockType { @Field(type => [String]) certifications: string[] @Field(type => [BlockTransactionType]) transactions: BlockTransactionType[] @Field(type => Int) medianTime: number - @Field() nonce?: number + @Field(type => String) nonce?: number @Field({ nullable: true }) parameters?: string @Field(type => Int) monetaryMass: number @Field(type => Int, { nullable: true }) dividend?: number -- GitLab