Browse Source

Small fixes

Leszek Wiesner 4 years ago
parent
commit
7d56f61a84

+ 3 - 3
query-node/.env

@@ -5,7 +5,7 @@ PROJECT_NAME=query_node
 #     Common settings     #
 ###########################
 
-# The env variables below are by default used by all services and should be 
+# The env variables below are by default used by all services and should be
 # overriden in local env files (e.g. ./generated/indexer) if needed
 # DB config
 DB_NAME=query_node
@@ -44,9 +44,9 @@ MAPPINGS_LOCATION=../../src
 TYPES_JSON=../../typedefs.json
 
 # Indexer GraphQL API endpoint to fetch indexed events
-INDEXER_ENDPOINT_URL=http://localhost:4100/graphql
+INDEXER_ENDPOINT_URL=http://localhost:4002/graphql
 
-# Block height from which the processor starts. Note that if 
+# Block height from which the processor starts. Note that if
 # there are already processed events in the database, this setting is ignored
 BLOCK_HEIGHT=0
 

+ 15 - 16
query-node/generated/graphql-server/generated/binding.ts

@@ -788,8 +788,8 @@ export interface MemberCreateInput {
   avatarUri?: String | null
   about?: String | null
   registeredAtBlock: Float
-  controllerAccount: String
-  rootAccount: String
+  controllerAccount: Bytes
+  rootAccount: Bytes
   happenedInId: ID_Output
 }
 
@@ -798,8 +798,8 @@ export interface MemberUpdateInput {
   avatarUri?: String | null
   about?: String | null
   registeredAtBlock?: Float | null
-  controllerAccount?: String | null
-  rootAccount?: String | null
+  controllerAccount?: Bytes | null
+  rootAccount?: Bytes | null
   happenedInId?: ID_Input | null
 }
 
@@ -849,16 +849,10 @@ export interface MemberWhereInput {
   registeredAtBlock_lt?: Int | null
   registeredAtBlock_lte?: Int | null
   registeredAtBlock_in?: Int[] | Int | null
-  controllerAccount_eq?: String | null
-  controllerAccount_contains?: String | null
-  controllerAccount_startsWith?: String | null
-  controllerAccount_endsWith?: String | null
-  controllerAccount_in?: String[] | String | null
-  rootAccount_eq?: String | null
-  rootAccount_contains?: String | null
-  rootAccount_startsWith?: String | null
-  rootAccount_endsWith?: String | null
-  rootAccount_in?: String[] | String | null
+  controllerAccount_eq?: Bytes | null
+  controllerAccount_in?: Bytes[] | Bytes | null
+  rootAccount_eq?: Bytes | null
+  rootAccount_in?: Bytes[] | Bytes | null
   happenedInId_eq?: ID_Input | null
   happenedInId_in?: ID_Output[] | ID_Output | null
 }
@@ -1475,8 +1469,8 @@ export interface Member extends BaseGraphQLObject {
   avatarUri?: String | null
   about?: String | null
   registeredAtBlock: Int
-  controllerAccount: String
-  rootAccount: String
+  controllerAccount: Bytes
+  rootAccount: Bytes
   happenedIn?: Block | null
   happenedInId: String
 }
@@ -1642,6 +1636,11 @@ The `Boolean` scalar type represents `true` or `false`.
 */
 export type Boolean = boolean
 
+/*
+GraphQL representation of Bytes
+*/
+export type Bytes = string
+
 /*
 The javascript `Date` as string. Type represents date and time as the ISO Date string.
 */

+ 19 - 35
query-node/generated/graphql-server/generated/classes.ts

@@ -14,12 +14,14 @@ import { ArgsType, Field as TypeGraphQLField, Float, InputType as TypeGraphQLInp
 // @ts-ignore
 import { registerEnumType, GraphQLISODateTime as DateTime } from "type-graphql";
 
+import * as BN from "bn.js";
+
 // prettier-ignore
 // @ts-ignore eslint-disable-next-line @typescript-eslint/no-var-requires
 const { GraphQLJSONObject } = require('graphql-type-json');
 // prettier-ignore
 // @ts-ignore
-import { BaseWhereInput, JsonObject, PaginationArgs, DateOnlyString, DateTimeString } from 'warthog';
+import { BaseWhereInput, JsonObject, PaginationArgs, DateOnlyString, DateTimeString, BigInt, Bytes } from 'warthog';
 
 import { Network } from "../src/modules/block/block.model";
 // @ts-ignore
@@ -1644,35 +1646,17 @@ export class MemberWhereInput {
   @TypeGraphQLField(() => [Int], { nullable: true })
   registeredAtBlock_in?: number[];
 
-  @TypeGraphQLField({ nullable: true })
-  controllerAccount_eq?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  controllerAccount_contains?: string;
+  @TypeGraphQLField(() => Bytes, { nullable: true })
+  controllerAccount_eq?: Buffer;
 
-  @TypeGraphQLField({ nullable: true })
-  controllerAccount_startsWith?: string;
+  @TypeGraphQLField(() => [Bytes], { nullable: true })
+  controllerAccount_in?: Buffer[];
 
-  @TypeGraphQLField({ nullable: true })
-  controllerAccount_endsWith?: string;
+  @TypeGraphQLField(() => Bytes, { nullable: true })
+  rootAccount_eq?: Buffer;
 
-  @TypeGraphQLField(() => [String], { nullable: true })
-  controllerAccount_in?: string[];
-
-  @TypeGraphQLField({ nullable: true })
-  rootAccount_eq?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  rootAccount_contains?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  rootAccount_startsWith?: string;
-
-  @TypeGraphQLField({ nullable: true })
-  rootAccount_endsWith?: string;
-
-  @TypeGraphQLField(() => [String], { nullable: true })
-  rootAccount_in?: string[];
+  @TypeGraphQLField(() => [Bytes], { nullable: true })
+  rootAccount_in?: Buffer[];
 
   @TypeGraphQLField(() => ID, { nullable: true })
   happenedInId_eq?: string;
@@ -1704,11 +1688,11 @@ export class MemberCreateInput {
   @TypeGraphQLField()
   registeredAtBlock!: number;
 
-  @TypeGraphQLField()
-  controllerAccount!: string;
+  @TypeGraphQLField(() => Bytes)
+  controllerAccount!: Buffer;
 
-  @TypeGraphQLField()
-  rootAccount!: string;
+  @TypeGraphQLField(() => Bytes)
+  rootAccount!: Buffer;
 
   @TypeGraphQLField(() => ID)
   happenedInId!: string;
@@ -1728,11 +1712,11 @@ export class MemberUpdateInput {
   @TypeGraphQLField({ nullable: true })
   registeredAtBlock?: number;
 
-  @TypeGraphQLField({ nullable: true })
-  controllerAccount?: string;
+  @TypeGraphQLField(() => Bytes, { nullable: true })
+  controllerAccount?: Buffer;
 
-  @TypeGraphQLField({ nullable: true })
-  rootAccount?: string;
+  @TypeGraphQLField(() => Bytes, { nullable: true })
+  rootAccount?: Buffer;
 
   @TypeGraphQLField(() => ID, { nullable: true })
   happenedInId?: string;

+ 13 - 16
query-node/generated/graphql-server/generated/schema.graphql

@@ -163,6 +163,9 @@ input BlockWhereUniqueInput {
   id: ID!
 }
 
+"""GraphQL representation of Bytes"""
+scalar Bytes
+
 type Category implements BaseGraphQLObject {
   id: ID!
   createdAt: DateTime!
@@ -970,10 +973,10 @@ type Member implements BaseGraphQLObject {
   registeredAtBlock: Int!
 
   """Member's controller account id"""
-  controllerAccount: String!
+  controllerAccount: Bytes!
 
   """Member's root account id"""
-  rootAccount: String!
+  rootAccount: Bytes!
   happenedIn: Block
   happenedInId: String!
 }
@@ -989,8 +992,8 @@ input MemberCreateInput {
   avatarUri: String
   about: String
   registeredAtBlock: Float!
-  controllerAccount: String!
-  rootAccount: String!
+  controllerAccount: Bytes!
+  rootAccount: Bytes!
   happenedInId: ID!
 }
 
@@ -1027,8 +1030,8 @@ input MemberUpdateInput {
   avatarUri: String
   about: String
   registeredAtBlock: Float
-  controllerAccount: String
-  rootAccount: String
+  controllerAccount: Bytes
+  rootAccount: Bytes
   happenedInId: ID
 }
 
@@ -1078,16 +1081,10 @@ input MemberWhereInput {
   registeredAtBlock_lt: Int
   registeredAtBlock_lte: Int
   registeredAtBlock_in: [Int!]
-  controllerAccount_eq: String
-  controllerAccount_contains: String
-  controllerAccount_startsWith: String
-  controllerAccount_endsWith: String
-  controllerAccount_in: [String!]
-  rootAccount_eq: String
-  rootAccount_contains: String
-  rootAccount_startsWith: String
-  rootAccount_endsWith: String
-  rootAccount_in: [String!]
+  controllerAccount_eq: Bytes
+  controllerAccount_in: [Bytes!]
+  rootAccount_eq: Bytes
+  rootAccount_in: [Bytes!]
   happenedInId_eq: ID
   happenedInId_in: [ID!]
 }

+ 1 - 1
query-node/generated/indexer/tsconfig.json

@@ -13,7 +13,7 @@
     "strictPropertyInitialization": false,
     "baseUrl": ".",
     "paths": {
-      "@polkadot/types/augment": ["../types/augment-codec/augment-types.ts"]
+      "@polkadot/types/augment": ["../../../types/augment-codec/augment-types.ts"]
     }
   },
   "exclude": ["node_modules"]