diff --git a/back/tests/schema-test.ts b/back/tests/schema-test.ts index 9380234b8d20895a3e71af087f03af1e85599d3d..c888926bf2cb43356b2aa0bab33ef71fa51bc72e 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 8b0d939126a02ed137eb679077c5cf2f8bf10031..8bd7c0dfa83793caa7c64e247864248438bb6c78 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