Options
All
  • Public
  • Public/Protected
  • All
Menu

Module @fabric-es/gateway-lib

gateway-lib

Installation

yarn install @fabric-es/gateway-lib

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

AclCommandHandler

AclCommandHandler: CommandHandler<AclCommands>

AclEvents

AclEvents: AclGranted | AclRevoked

ApolloContext

ApolloContext: object

Type declaration

  • pubSub: PubSub
  • queryHandler: QueryHandler
  • username: string

Auth0UserInfo

Auth0UserInfo: object

Type declaration

  • email: string
  • email_verified: string
  • Optional name?: string
  • Optional nickname?: string
  • Optional picture?: string
  • sub: string
  • Optional updated_at?: string

AuthenticateResponse

AuthenticateResponse: object

Type declaration

  • authenticated: boolean
  • is_admin: boolean
  • ok: boolean
  • user_id: string
  • username: string

CaIdentity

CaIdentity: object
about

CA Identity is is identity object of Fabric CA Server

see

Fabric.User

Type declaration

  • affiliation: string
  • attrs: any[]
  • id: string
  • max_enrollments: number
  • typ: string

FederatedService

FederatedService: object

Type declaration

  • config: function
      • (sdl: object[]): object
      • Parameters

        • sdl: object[]

        Returns object

        • addPrivateRepository: function
        • addRemoteRepository: function
            • <TParent, TEntity, TRedis, TOutput, TEvent>(parent: EntityType<TParent>, entity: EntityType<TEntity>, option: object): AddRemoteRepository
            • Type parameters

              • TParent

              • TEntity

              • TRedis

              • TOutput

              • TEvent

              Parameters

              • parent: EntityType<TParent>
              • entity: EntityType<TEntity>
              • option: object
                • fields: RedisearchDefinition<TParent>
                • Optional postSelector?: Selector<TRedis, TOutput>
                • Optional preSelector?: Selector<[TParent, Array], TRedis>
                • reducer: ReducerCallback<TParent, TEvent>

              Returns AddRemoteRepository

        • addRepository: function
            • <TEntity, TRedis, TOutput, TEvent>(entity: EntityType<TEntity>, option: object): AddRepository
            • Type parameters

              • TEntity

              • TRedis

              • TOutput

              • TEvent

              Parameters

              • entity: EntityType<TEntity>
              • option: object
                • fields: RedisearchDefinition<TEntity>
                • Optional postSelector?: Selector<TRedis, TOutput>
                • Optional preSelector?: Selector<[TEntity, Array], TRedis>
                • reducer: ReducerCallback<TEntity, TEvent>

              Returns AddRepository

  • disconnect: function
      • (): void
      • Returns void

  • getMspId: function
      • (): string
      • Returns string

  • getPrivateRepository: function
  • getRedisRepos: function
  • getRepository: function
      • <TEntity, TOutput, TEvent>(entity: EntityType<TEntity>, reducer: ReducerCallback<TEntity, TEvent>): Repository<TEntity, TOutput, TEvent>
      • Type parameters

        • TEntity

        • TOutput

        • TEvent

        Parameters

        Returns Repository<TEntity, TOutput, TEvent>

  • getServiceName: function
      • (): string
      • Returns string

  • shutdown: function
      • (server: ApolloServer): Promise<void>
      • Parameters

        • server: ApolloServer

        Returns Promise<void>

FullTextSearchInput

FullTextSearchInput: object

Type declaration

  • cursor: number
  • Optional pagesize?: number
  • Optional param?: string
  • query: string

LoginResponse

LoginResponse: object
about

the typed returned from auth-server, upon login

Type declaration

  • access_token: string
  • id: string
  • token_type: string
  • username: string

Notification

Notification: object
about

notification for web ui, upon read status

Type declaration

  • commitId: string
  • creator: string
  • entityName: string
  • id: string
  • read: boolean

OrgCommands

OrgCommands: object

Type declaration

  • DefineOrgName: object
    • mspId: string
    • payload: object
      • name: string
      • timestamp: number
  • DefineOrgUrl: object
    • mspId: string
    • payload: object
      • timestamp: number
      • url: string
  • LoadPubkey: object
    • mspId: string
    • payload: object
      • pubkey: string
      • timestamp: number
  • ShutdownOrg: object
    • mspId: string
    • payload: object
      • timestamp: number
  • StartOrg: object
    • mspId: string
    • payload: object
      • name: string
      • Optional pubkey?: string
      • timestamp: number
      • Optional url?: string

OrgEvents

OrgIndices

PartialOrganization

PartialOrganization: Pick<Organization, "id" | "mspId" | "name" | "url" | "status" | "timestamp">

QueryHandlerGqlCtx

QueryHandlerGqlCtx: object
about

apollo context for QueryHandler

Type declaration

  • entityNames: string[]
  • Optional is_admin?: boolean
  • Optional pubSub?: RedisPubSub
  • publisher: Redis.Redis
  • Optional queryDatabase?: QueryDatabase
  • queryHandler: QueryHandler
  • Optional user_id?: string
  • Optional username?: string

QueryHandlerResolvers

QueryHandlerResolvers: object
about

resovlers

Type declaration

  • Mutation: object
    • createCommit: function
      params

      entityName

      params

      id

      params

      type

      params

      payloadString

      params

      ctx

      returns

      Promise<Commit>

    • ping: function
      params

      message

      params

      ctx

      returns

      Promise<boolean>

    • reloadEntities: function
      params

      entityNames

      params

      ctx

      returns

      Promise<boolean>

        • Parameters

          Returns Promise<boolean>

  • Query: object
    • fullTextSearchCommit: function
      params

      query

      params

      cursor

      params

      pagesize

      params

      ctx

      returns

      Promise<Commit[]>

    • fullTextSearchEntity: function
      params

      query

      params

      cursor

      params

      pagesize

      params

      ctx

      returns

      Promise<Paginated<QueryHandlerEntity>>

        • Type parameters

          • TEntity

          Parameters

          • _: null
          • variables: object
            • Optional cursor?: number
            • Optional pagesize?: number
            • query: string
          • ctx: QueryHandlerGqlCtx

          Returns Promise<Paginated<TEntity>>

    • getNotification: function
      params

      entityName

      params

      commitId

      params

      id

      params

      ctx

      returns

      Promise<Notification>

    • getNotifications: function
      params

      ctx

      returns

      Promise<Notification[]>

    • me: function
      params

      ctx

      returns

      string

  • Subscription: object
    • entityAdded: object
      • subscribe: function
          • Parameters

            Returns AsyncIterator<unknown, any, undefined>

    • pong: object
      • subscribe: function
          • Parameters

            Returns AsyncIterator<unknown, any, undefined>

    • systemEvent: object
      • subscribe: function
          • Parameters

            Returns AsyncIterator<unknown, any, undefined>

QueryHandlerService

QueryHandlerService: object

Type declaration

  • addRedisRepository: function
      • <TInput, TItemInRedis, TOutput, TEvent>(entity: EntityType<TInput>, option: object): AddQHRedisRepository
      • Type parameters

        • TInput

        • TItemInRedis

        • TOutput

        • TEvent

        Parameters

        • entity: EntityType<TInput>
        • option: object
          • fields: RedisearchDefinition<TInput>
          • Optional postSelector?: Selector<TItemInRedis, TOutput>
          • Optional preSelector?: Selector<[TInput, Array], TItemInRedis>
          • reducer: ReducerCallback<TInput, TEvent>

        Returns AddQHRedisRepository

  • getEntityNames: function
      • (): string[]
      • Returns string[]

  • getQueryHandler: function
  • getRedisRepos: function
  • getReducers: function
  • getServer: function
      • (): ApolloServer
      • Returns ApolloServer

  • isReady: function
      • (): boolean
      • Returns boolean

  • publisher: Redisearch
  • run: function
  • shutdown: function
      • (): Promise<void>
      • Returns Promise<void>

QueryResponse

QueryResponse: object

Type declaration

  • body: object
    • data: any
    • errors: ApolloError[]

RegisterResponse

RegisterResponse: object
about

the typed returned from auth-server, upon user registration

Type declaration

  • id: string
  • username: string

ServiceContext

ServiceContext: object

Type declaration

  • accessor: string
  • ec: ec
  • hash: string
  • id: string
  • pubkey: string
  • signature: string
  • user_id: string
  • username: string

UserEvents

UserIndices

Variables

Const ANNO_IGNORE

ANNO_IGNORE: "@SKIP" = "@SKIP"

Const ANNO_PRIMRY

ANNO_PRIMRY: "@PRIMARY" = "@PRIMARY"

Const ANNO_SCHEMA

ANNO_SCHEMA: "@SCHEMA " = "@SCHEMA "

Const CLOUD

CLOUD: 4 = 4

Const COMMIT_ARRIVED

COMMIT_ARRIVED: "COMMIT_ARRIVED" = "COMMIT_ARRIVED"

Const CONSOLE

CONSOLE: 1 = 1

Const DEV

DEV: "DEV" = "DEV"

Const FILE

FILE: 2 = 2

Const FULL_TXT_SEARCH_ENTITY

FULL_TXT_SEARCH_ENTITY: "query FullTextSearchEntity ($query: String!$cursor: Int$pagesize: Int) {fullTextSearchEntity (query: $querycursor: $cursorpagesize: $pagesize) {totalhasMorecursoritems {identityNamevaluecommitseventstagdesccreatedcreatorlastModifiedtimeline}}}" = `query FullTextSearchEntity ($query: String!$cursor: Int$pagesize: Int) {fullTextSearchEntity (query: $querycursor: $cursorpagesize: $pagesize) {totalhasMorecursoritems {identityNamevaluecommitseventstagdesccreatedcreatorlastModifiedtimeline}}}`

Const IS_HTTPS

IS_HTTPS: "_is_Using_Https" = "_is_Using_Https"

Const PAGINATED_COMMIT

PAGINATED_COMMIT: "query PaginatedCommit ($creator: String$cursor: Int$pagesize: Int$entityName: String!$id: String$sortByField: String$sort: String$events: [String!]$startTime: Int$endTime: Int) {paginatedCommit (creator: $creatorcursor: $cursorpagesize: $pagesizeentityName: $entityNameid: $idsortByField: $sortByFieldsort: $sortevents: $eventsstartTime: $startTimeendTime: $endTime) {totalhasMorecursoritems {identityNameversioncommitIdentityIdeventsString}}}" = `query PaginatedCommit ($creator: String$cursor: Int$pagesize: Int$entityName: String!$id: String$sortByField: String$sort: String$events: [String!]$startTime: Int$endTime: Int) {paginatedCommit (creator: $creatorcursor: $cursorpagesize: $pagesizeentityName: $entityNameid: $idsortByField: $sortByFieldsort: $sortevents: $eventsstartTime: $startTimeendTime: $endTime) {totalhasMorecursoritems {identityNameversioncommitIdentityIdeventsString}}}`

Const PAGINATED_ENTITY

PAGINATED_ENTITY: "query PaginatedEntity ($creator: String$cursor: Int$pagesize: Int$entityName: String!$id: String$sortByField: String$sort: String$scope: SearchScope$startTime: Int$endTime: Int) {paginatedEntity (creator: $creatorcursor: $cursorpagesize: $pagesizeentityName: $entityNameid: $idsortByField: $sortByFieldsort: $sortscope: $scopestartTime: $startTimeendTime: $endTime) {totalhasMorecursoritems {identityNamevaluecommitseventstagdesccreatedcreatorlastModifiedtimeline}}}" = `query PaginatedEntity ($creator: String$cursor: Int$pagesize: Int$entityName: String!$id: String$sortByField: String$sort: String$scope: SearchScope$startTime: Int$endTime: Int) {paginatedEntity (creator: $creatorcursor: $cursorpagesize: $pagesizeentityName: $entityNameid: $idsortByField: $sortByFieldsort: $sortscope: $scopestartTime: $startTimeendTime: $endTime) {totalhasMorecursoritems {identityNamevaluecommitseventstagdesccreatedcreatorlastModifiedtimeline}}}`

Const PUBKEY

PUBKEY: DocumentNode = gql`query Pubkey {pubkey}`

Const PUBKEY

PUBKEY: DocumentNode = gql`query Pubkey {pubkey}`

Const ROOT_OPS_MUTTN

ROOT_OPS_MUTTN: "mutation" = "mutation"

Const ROOT_OPS_QUERY

ROOT_OPS_QUERY: "query" = "query"

Const ROOT_OPS_SBSCP

ROOT_OPS_SBSCP: "subscription" = "subscription"

Const appendTimestamp

appendTimestamp: FormatWrap = format((info, opts) => {if (opts.tz) info.timestamp = moment().tz(opts.tz).format();return info;})

Const authCheck

authCheck: string = process.env.AUTHORIZATION_SERVER_URI

combine

combine: combine

Const fetch

fetch: any = nodeFetch as any

Const fetch

fetch: any = nodeFetch as any

label

label: label

Const logFormat

logFormat: Format = printf(({ level, message, label, timestamp }) => {return `${timestamp} [${level}]: ${message} (${label})`;})

Const logger

logger: Logger = getLogger('[gw-lib] catalog.js')

Const logger

logger: Logger = getLogger('[gateway-lib] queryHandler/resolvers.js')

Const logger

logger: Logger = getLogger('organization/typeDefs.js')

Const logger

logger: Logger = getLogger('user/typeDefs.js')

Const logger

logger: Logger = getLogger('[query-handler] app.js')

Const loggers

loggers: Record<string, Logger>

Const port

port: number = (process.env.PORT || 8080) as number

Const port

port: number = parseInt(process.env.QUERY_PORT, 10) || 5001

printf

printf: printf

Const typeDefs

typeDefs: DocumentNode = gql`type Query {us: _OrganizationgetOrgById(mspId: String!): _Organizationpubkey: String}type _Organization @key(fields: "mspId") {mspId: String!name: String!url: String!pubkey: Stringstatus: Int!timestamp: String!}`

Const userTypeDefsMutation

userTypeDefsMutation: "createUser(name: String!, userId: String!): UserResponse" = `createUser(name: String!, userId: String!): UserResponse`

Const userTypeDefsQuery

userTypeDefsQuery: "getCommitsByUserId(userId: String!): [UserCommit]!getPaginatedUser(cursor: Int, pageSize: Int = 10): PaginatedUsers!getUserById(userId: String!): UsersearchUserByFields(where: String!): [User]searchUserContains(contains: String!): [User]me: User" = `getCommitsByUserId(userId: String!): [UserCommit]!getPaginatedUser(cursor: Int, pageSize: Int = 10): PaginatedUsers!getUserById(userId: String!): UsersearchUserByFields(where: String!): [User]searchUserContains(contains: String!): [User]me: User`

Const userTypeDefsType

userTypeDefsType: "type User @key(fields: "userId") {userId: String!name: String!mergedUserIds: [String!]}type PaginatedUsers {entities: [User!]!total: Int!hasMore: Boolean!otherInfo: [String!]!}union UserResponse = UserCommit | UserErrortype UserEvent {type: String}type UserCommit {id: StringentityName: Stringversion: IntcommitId: StringmspId: StringentityId: Stringevents: [UserEvent!]}type UserError {message: String!stack: String}" = `type User @key(fields: "userId") {userId: String!name: String!mergedUserIds: [String!]}type PaginatedUsers {entities: [User!]!total: Int!hasMore: Boolean!otherInfo: [String!]!}union UserResponse = UserCommit | UserErrortype UserEvent {type: String}type UserCommit {id: StringentityName: Stringversion: IntcommitId: StringmspId: StringentityId: Stringevents: [UserEvent!]}type UserError {message: String!stack: String}`

Functions

Const aclCommandHandler

  • aclCommandHandler(__namedParameters: object): object
  • Parameters

    • __namedParameters: object

    Returns object

    • GrantAcl: function
      • GrantAcl(__namedParameters: object): Promise<Commit>
      • Parameters

        • __namedParameters: object
          • payload: object
            • accessor: string
            • entity: string
            • entityId: string
            • expireAt: number

        Returns Promise<Commit>

    • RevokeAcl: function
      • RevokeAcl(__namedParameters: object): Promise<Commit>
      • Parameters

        • __namedParameters: object
          • payload: object
            • accessor: string
            • entity: string
            • entityId: string

        Returns Promise<Commit>

Const aclReducer

  • Parameters

    Returns Acl

Const buildCatalogedSchema

  • buildCatalogedSchema(service: string, serviceType: ServiceType, sdl: object): object
  • Parameters

    • service: string
    • serviceType: ServiceType
    • sdl: object
      • resolvers: any
      • typeDefs: DocumentNode

    Returns object

    • resolvers: any
    • typeDefs: DocumentNode

Const buildObjectType

  • buildObjectType(d: DirectiveDefinitionNode | EnumTypeDefinitionNode | InputObjectTypeDefinitionNode | InterfaceTypeDefinitionNode | ObjectTypeDefinitionNode | ScalarTypeDefinitionNode | SchemaDefinitionNode | UnionTypeDefinitionNode, i: boolean, sideEffect?: function): object
  • Parameters

    • d: DirectiveDefinitionNode | EnumTypeDefinitionNode | InputObjectTypeDefinitionNode | InterfaceTypeDefinitionNode | ObjectTypeDefinitionNode | ScalarTypeDefinitionNode | SchemaDefinitionNode | UnionTypeDefinitionNode
    • i: boolean
    • Optional sideEffect: function
        • (v: any): void
        • Parameters

          • v: any

          Returns void

    Returns object

    • found: string[]
    • result: any

Const buildRedisOptions

  • buildRedisOptions(host: string, port: number, logger: Logger): object
  • Parameters

    • host: string
    • port: number
    • logger: Logger

    Returns object

    • host: string
    • port: number
    • reconnectOnError: function
      • reconnectOnError(err: Error): 1
      • Parameters

        • err: Error

        Returns 1

    • retryStrategy: function
      • retryStrategy(times: number): number
      • Parameters

        • times: number

        Returns number

Const catchResolverErrors

  • catchResolverErrors<TResult>(fcn: any, __namedParameters: object): (Anonymous function)
  • Type parameters

    • TResult

    Parameters

    • fcn: any
    • __namedParameters: object
      • fcnName: any
      • logger: any
      • privateEntityName: any
      • useAdmin: boolean
      • useAuth: any

    Returns (Anonymous function)

Const checkDesc

  • checkDesc(n: any, sideEffect?: function): 0 | 1 | 4 | 3
  • Parameters

    • n: any
    • Optional sideEffect: function
        • (v: any): void
        • Parameters

          • v: any

          Returns void

    Returns 0 | 1 | 4 | 3

Const composeRedisRepos

  • composeRedisRepos(client: Redisearch, redisRepos: Record<string, RedisRepository<any, any, any>>): (Anonymous function)
  • Parameters

    • client: Redisearch
    • redisRepos: Record<string, RedisRepository<any, any, any>>

    Returns (Anonymous function)

Const createAdminService

  • createAdminService(__namedParameters: object): Promise<object>
  • about

    create admin micro-service

    params

    option

    {
      // true if running with docker-compose
      asLocalhost?: boolean;
      // ca administrator id
      caAdmin: string;
      // ca administrator password
      caAdminPW: string;
      channelName: string;
      // path to connection profile yaml
      connectionProfile: string;
      // enrollment secret for organization admin
      enrollmentSecret?: string;
      // allow graphql introspection
      introspection?: boolean;
      // the same as mspId
      orgName: string;
      // uri for Apollo Federated Gateway
      orgUrl: string;
      // allow graphql playground
      playground?: boolean
      redisOptions: RedisOptions
      // path to file system wallet
      walletPath: string
    }

    Parameters

    • __namedParameters: object
      • asLocalhost: boolean
      • caAdmin: string
      • caAdminPW: string
      • caName: string
      • channelName: string
      • connectionProfile: string
      • enrollmentSecret: string
      • introspection: boolean
      • isAddUserRepo: boolean
      • keyPath: string
      • orgName: string
      • orgUrl: string
      • playground: boolean
      • redisOptions: RedisOptions
      • walletPath: string

    Returns Promise<object>

Const createAdminServiceWithAuth0

  • createAdminServiceWithAuth0(__namedParameters: object): Promise<object>
  • about

    create admin micro-service

    params

    option

    {
      // true if running with docker-compose
      asLocalhost?: boolean;
      // ca administrator id
      caAdmin: string;
      // ca administrator password
      caAdminPW: string;
      channelName: string;
      // path to connection profile yaml
      connectionProfile: string;
      // enrollment secret for organization admin
      enrollmentSecret?: string;
      // allow graphql introspection
      introspection?: boolean;
      // the same as mspId
      orgName: string;
      // uri for Apollo Federated Gateway
      orgUrl: string;
      // allow graphql playground
      playground?: boolean
      redisOptions: RedisOptions
      // path to file system wallet
      walletPath: string
    }

    Parameters

    • __namedParameters: object
      • asLocalhost: boolean
      • caAdmin: string
      • caAdminPW: string
      • caName: string
      • channelName: string
      • connectionProfile: string
      • enrollmentSecret: string
      • introspection: boolean
      • isAddUserRepo: boolean
      • keyPath: string
      • orgName: string
      • orgUrl: string
      • playground: boolean
      • redisOptions: RedisOptions
      • walletPath: string

    Returns Promise<object>

Const createGateway

  • createGateway(__namedParameters: object, catalog: function): Promise<Server | Server>
  • about

    apollo federated gateway

    example

    counter.unit-test.ts

    const apollo = await createGateway({
      serviceList: [{
        name: 'admin': url: 'http://localhost:15011/graphql'
        name: 'counter': url: 'http://localhost:15012/graphql'
      }],
      authenticationCheck: 'http://localhost:8080/oauth/authenticate'
    })
    params

    option

    {
      // arrays of microservice
      serviceList : { url: string; name: string; }[];
      // url for authentication check
      authenticationCheck: string
      // reserved for future use
      useCors: boolean;
      // reserved for future use
      corsOrigin: string;
      // toggle Apollo Gateway debug mode
      debug: boolean;
    }

    Parameters

    • __namedParameters: object
      • adminHost: string
      • adminPort: number
      • authenticationCheck: string
      • certKeyPath: string
      • certPath: string
      • corsOrigin: string
      • debug: boolean
      • gatewayName: string
      • introspection: boolean
      • playground: boolean
      • serviceList: object[]
      • useCors: boolean
    • catalog: function
        • (ctlg: string, app?: Express): function
        • Parameters

          • ctlg: string
          • Optional app: Express

          Returns function

            • (req: Request, res: Response): void
            • Parameters

              • req: Request
              • res: Response

              Returns void

    Returns Promise<Server | Server>

Const createGatewayWithAuth0

  • createGatewayWithAuth0(__namedParameters: object, catalog: function): Promise<Server | Server>
  • about

    apollo federated gateway

    example

    counter.unit-test.ts

    const apollo = await createGateway({
      serviceList: [{
        name: 'admin': url: 'http://localhost:15011/graphql'
        name: 'counter': url: 'http://localhost:15012/graphql'
      }],
      authenticationCheck: 'http://localhost:8080/oauth/authenticate'
    })
    params

    option

    {
      // arrays of microservice
      serviceList : { url: string; name: string; }[];
      // url for authentication check
      authenticationCheck: string
      // reserved for future use
      useCors: boolean;
      // reserved for future use
      corsOrigin: string;
      // toggle Apollo Gateway debug mode
      debug: boolean;
    }

    Parameters

    • __namedParameters: object
      • adminHost: string
      • adminPort: number
      • authenticationCheck: string
      • certKeyPath: string
      • certPath: string
      • corsOrigin: string
      • customExpressApp: Express
      • debug: boolean
      • enrollmentId: string
      • gatewayName: string
      • introspection: boolean
      • playground: boolean
      • serviceList: object[]
      • useCors: boolean
    • catalog: function
        • (ctlg: string, app?: Express): function
        • Parameters

          • ctlg: string
          • Optional app: Express

          Returns function

            • (req: Request, res: Response): void
            • Parameters

              • req: Request
              • res: Response

              Returns void

    Returns Promise<Server | Server>

Const createQueryHandlerService

  • createQueryHandlerService(__namedParameters: object): object
  • about

    create query handler microservice

    params

    entityNames

    params

    option

    {
      // true if running with docker-compose
      asLocalhost: boolean;
      // url to auth-server
      authCheck: string;
      channelName: string;
      // path to connection profile yaml
      connectionProfile: string;
      enrollmentId: string;
      // allow graphql introspection
      introspection: boolean;
      // allow graphql playground
      playground: boolean;
      // reducer map
      reducers: Record<string, Reducer>
      // FileWallet instance
      wallet: Wallet
    }

    Parameters

    • __namedParameters: object
      • asLocalhost: boolean
      • authCheck: string
      • channelName: string
      • connectionProfile: string
      • enrollmentId: string
      • introspection: boolean
      • isAddUserRepo: boolean
      • playground: boolean
      • redisOptions: RedisOptions
      • wallet: Wallet

    Returns object

    • addRedisRepository: function
        • <TInput, TItemInRedis, TOutput, TEvent>(entity: EntityType<TInput>, option: object): AddQHRedisRepository
        • Type parameters

          • TInput

          • TItemInRedis

          • TOutput

          • TEvent

          Parameters

          • entity: EntityType<TInput>
          • option: object
            • fields: RedisearchDefinition<TInput>
            • Optional postSelector?: Selector<TItemInRedis, TOutput>
            • Optional preSelector?: Selector<[TInput, Array], TItemInRedis>
            • reducer: ReducerCallback<TInput, TEvent>

          Returns AddQHRedisRepository

Const createResolvers

  • createResolvers(__namedParameters: object): Promise<object>
  • about

    create resolvers

    Parameters

    • __namedParameters: object
      • asLocalhost: boolean
      • caAdmin: string
      • caAdminPW: string
      • caName: string
      • channelName: string
      • connectionProfile: string
      • enrollmentSecret: string
      • mspId: string
      • wallet: Wallet

    Returns Promise<object>

Const createResolversWithAuth0

  • createResolversWithAuth0(__namedParameters: object): Promise<object>
  • about

    create resolvers using Auth0 Notice that, in legacy auth-server, wallet is created for each user In this auth0 implementation, only organization administrator requires wallet entry. All user's command is invoked via orgadmin (i.e. enrollmentId) / wallet.

    Parameters

    • __namedParameters: object
      • asLocalhost: boolean
      • caAdmin: string
      • caAdminPW: string
      • caName: string
      • channelName: string
      • connectionProfile: string
      • enrollmentSecret: string
      • mspId: string
      • wallet: Wallet

    Returns Promise<object>

Const createService

  • createService(__namedParameters: object): Promise<object>
  • about

    entity microservice

    example

    counter.unit-test.ts

     // step 1: init service
     const { config, getRepository } = await createService({
       asLocalhost: true,
       channelName,
       connectionProfile,
       serviceName: 'counter',
       enrollmentId: orgAdminId,
       wallet,
       redisOptions,
     });
    
     // step 2: configure service with Repository
     const modelApolloService = await config({ typeDefs, resolvers })
       .addRepository(getRepository<Counter, CounterEvent>(entityName, counterReduer))
       .create();
    
     // step 3: run service
     await modeApolloService.listen({ port });
    params

    option

    {
      // run as local host, when using docker-compose
      asLocalhost: boolean;
      enrollmentId: string
      // microservice name
      serviceName: string;
      // is a private data repository
      isPrivate: boolean;
      channelName: string;
      // path to connectionProfile
      connectionProfile: string;
      // Fabric file wallet
      wallet: Wallet;
      // redis option
      redisOptions: RedisOptions;
    }

    Parameters

    • __namedParameters: object
      • asLocalhost: boolean
      • channelName: string
      • connectionProfile: string
      • enrollmentId: string
      • isAddUserRepo: boolean
      • keyPath: string
      • redisOptions: RedisOptions
      • serviceName: string
      • type: ServiceType
      • wallet: Wallet

    Returns Promise<object>

Const findDataType

  • findDataType(f: FieldDefinitionNode | InputValueDefinitionNode | OperationTypeDefinitionNode, sideEffect?: function): object | object | object
  • Parameters

    • f: FieldDefinitionNode | InputValueDefinitionNode | OperationTypeDefinitionNode
    • Optional sideEffect: function
        • (v: any): void
        • Parameters

          • v: any

          Returns void

    Returns object | object | object

Const getAcl

  • Parameters

    Returns Promise<Acl>

Const getAclResolver

  • Parameters

    Returns object

    • Mutation: object
      • [`_grantAccess_${entity}`]: function
        • [`_grantAccess_${entity}`](_: any, __namedParameters: object, __namedParameters: object): Promise<Commit> | ForbiddenError
        • Parameters

          • _: any
          • __namedParameters: object
            • accessor: any
            • entityId: any
            • expireTime: any
          • __namedParameters: object
            • is_admin: any
            • username: any

          Returns Promise<Commit> | ForbiddenError

      • [`_revokeAccess_${entity}`]: function
        • [`_revokeAccess_${entity}`](_: any, __namedParameters: object, __namedParameters: object): Promise<Commit> | ForbiddenError
        • Parameters

          • _: any
          • __namedParameters: object
            • accessor: any
            • entityId: any
          • __namedParameters: object
            • is_admin: any
            • username: any

          Returns Promise<Commit> | ForbiddenError

    • Query: object
      • [`_checkAccess_${entity}`]: function
        • [`_checkAccess_${entity}`](_: any, __namedParameters: object, __namedParameters: object): Promise<Acl>
        • Parameters

          • _: any
          • __namedParameters: object
            • accessor: any
            • entityId: any
          • __namedParameters: object
            • username: any

          Returns Promise<Acl>

Const getAclTypeDefs

  • getAclTypeDefs(entity: string): DocumentNode
  • Parameters

    • entity: string

    Returns DocumentNode

Const getCatalog

  • getCatalog(gatewayName: string, services: object[]): Promise<string>
  • Parameters

    • gatewayName: string
    • services: object[]

    Returns Promise<string>

Const getCatalogResolver

  • getCatalogResolver(service: string, catalog: object): object
  • Parameters

    • service: string
    • catalog: object
      • count: number
      • service: object
        • name: string
        • type: string

    Returns object

    • Query: object
      • [`_catalog_${service}`]: function
        • [`_catalog_${service}`](): object
        • Returns object

          • count: number
          • service: object
            • name: string
            • type: string

Const getCatalogTypeDefs

  • getCatalogTypeDefs(service: string): DocumentNode
  • Parameters

    • service: string

    Returns DocumentNode

Const getHttpsServerOption

  • getHttpsServerOption(__namedParameters: object): Promise<ServerOptions | https.ServerOptions | undefined>
  • Parameters

    • __namedParameters: object
      • certKeyPath: string
      • certPath: string
      • mock: boolean
      • options: ServerOptions | ServerOptions

    Returns Promise<ServerOptions | https.ServerOptions | undefined>

Const getLogger

  • getLogger(name: string, option?: object): Logger
  • Parameters

    • name: string
    • Optional option: object
      • Optional level?: string
      • Optional target?: string
      • Optional timezone?: string

    Returns Logger

Const getProcessDescriptions

  • getProcessDescriptions(logger: Logger): Promise<object | object>
  • Parameters

    • logger: Logger

    Returns Promise<object | object>

Const getProcessDescriptions

  • getProcessDescriptions(logger: Logger): Promise<object | object>
  • Parameters

    • logger: Logger

    Returns Promise<object | object>

Const getQueryNames

  • getQueryNames(query: DocumentNode): object
  • Parameters

    • query: DocumentNode

    Returns object

    • operationName: string | undefined
    • queryName: string | undefined

Const httpsify

  • httpsify(uri: string): string
  • Parameters

    • uri: string

    Returns string

Const isAuth0UserInfo

  • isAuth0UserInfo(input: any): input
  • Parameters

    • input: any

    Returns input

Const isAuthResponse

  • isAuthResponse(input: any): input
  • Parameters

    • input: any

    Returns input

Const isBaseEvent

  • isBaseEvent(input: any): input
  • Parameters

    • input: any

    Returns input

Const isCaIdentity

  • isCaIdentity(input: any): input
  • Parameters

    • input: any

    Returns input

Const isLoginResponse

  • isLoginResponse(input: any): input
  • Parameters

    • input: any

    Returns input

Const isOrganization

  • isOrganization(input: any): input
  • Parameters

    • input: any

    Returns input

Const isRegisterResponse

  • isRegisterResponse(input: any): input
  • Parameters

    • input: any

    Returns input

Const isUser

  • isUser(input: any): input
  • Parameters

    • input: any

    Returns input

Const normalizeReq

  • normalizeReq(query: string, variables: Record<string, any>): string
  • Parameters

    • query: string
    • variables: Record<string, any>

    Returns string

Const orgCommandHandler

  • orgCommandHandler(__namedParameters: object): object
  • about

    command handler for organization

    Parameters

    Returns object

    • DefineOrgName: function
      • DefineOrgName(__namedParameters: object): Promise<Commit>
      • Parameters

        • __namedParameters: object
          • mspId: string
          • payload: object
            • name: string
            • timestamp: number

        Returns Promise<Commit>

    • DefineOrgUrl: function
      • DefineOrgUrl(__namedParameters: object): Promise<Commit>
      • Parameters

        • __namedParameters: object
          • mspId: string
          • payload: object
            • timestamp: number
            • url: string

        Returns Promise<Commit>

    • LoadPubkey: function
      • LoadPubkey(__namedParameters: object): Promise<Commit>
      • Parameters

        • __namedParameters: object
          • mspId: string
          • payload: object
            • pubkey: string
            • timestamp: number

        Returns Promise<Commit>

    • ShutdownOrg: function
      • ShutdownOrg(__namedParameters: object): Promise<Commit>
      • Parameters

        • __namedParameters: object
          • mspId: string
          • payload: object
            • timestamp: number

        Returns Promise<Commit>

    • StartOrg: function
      • StartOrg(__namedParameters: object): Promise<Commit>
      • Parameters

        • __namedParameters: object
          • mspId: string
          • payload: object
            • name: string
            • pubkey: string
            • timestamp: number
            • url: string

        Returns Promise<Commit>

Const orgReducer

  • about

    organization reducer

    Parameters

    Returns Organization

Const parseType

  • parseType(t: TypeNode): object | object
  • Parameters

    • t: TypeNode

    Returns object | object

Const queryRemoteData

  • queryRemoteData<TEntity>(entity: any, __namedParameters: object): Promise<TEntity[]>
  • Type parameters

    • TEntity

    Parameters

    • entity: any
    • __namedParameters: object
      • context: any
      • id: any
      • query: any

    Returns Promise<TEntity[]>

Const rebuildIndex

  • rebuildIndex(redisRepo: RedisRepository<any, any, any>, logger: Logger): Promise<"OK">
  • about

    drop and rebuild cidx and eidx

    params

    publisher

    params

    logger

    Parameters

    Returns Promise<"OK">

Const reconcile

  • reconcile(entityNames: any, queryHandler: QueryHandler, logger: Logger): Promise<void>
  • about

    reconcile on chain data from Fabric to redis

    params

    entityNames

    params

    queryHandler

    params

    logger

    Parameters

    • entityNames: any
    • queryHandler: QueryHandler
    • logger: Logger

    Returns Promise<void>

Const retrieveRemoteData

  • retrieveRemoteData(__namedParameters: object): Promise<FetchResult<object, Record<string, any>, Record<string, any>>>
  • Parameters

    • __namedParameters: object
      • accessor: string
      • context: any
      • id: string
      • keyPath: string
      • query: DocumentNode
      • uri: string

    Returns Promise<FetchResult<object, Record<string, any>, Record<string, any>>>

Const userCommandHandler

  • userCommandHandler(__namedParameters: object): object
  • Parameters

    Returns object

    • CreateUser: function
      • CreateUser(__namedParameters: object): Promise<Commit>
      • Parameters

        • __namedParameters: object
          • payload: object
            • name: string
            • timestamp: number
          • userId: string

        Returns Promise<Commit>

    • DeclineReviewInvitation: function
      • DeclineReviewInvitation(__namedParameters: object): Promise<Commit>
      • Parameters

        • __namedParameters: object
          • payload: object
            • documentId: string
            • timestamp: number
            • tradeId: string
          • userId: string

        Returns Promise<Commit>

    • ExpireReviewInvitation: function
      • ExpireReviewInvitation(__namedParameters: object): Promise<Commit>
      • Parameters

        • __namedParameters: object
          • payload: object
            • documentId: string
            • timestamp: number
            • tradeId: string
          • userId: string

        Returns Promise<Commit>

Const userReducer

  • Parameters

    Returns User

Object literals

Const orgIndices

orgIndices: object

id

id: object

index

index: object

sortable

sortable: true = true

type

type: string = "TEXT"

mspId

mspId: object

index

index: object

sortable

sortable: true = true

type

type: string = "TEXT"

name

name: object

index

index: object

sortable

sortable: true = true

type

type: string = "TEXT"

status

status: object

index

index: object

type

type: string = "TEXT"

timestamp

timestamp: object

index

index: object

sortable

sortable: true = true

type

type: string = "NUMERIC"

url

url: object

altName

altName: string = "ref"

Const resolvers

resolvers: object
about

query handler resolvers.

JSON

JSON: GraphQLScalarType = GraphQLJSON

Mutation

Mutation: object

createCommit

createCommit: function = catchResolverErrors<Commit>(async (_,{ entityName, id, type, payloadString },{ queryHandler, username }: ApolloContext) => {const payload = JSON.parse(payloadString);const { data, error } = await queryHandler.create(entityName)({ enrollmentId: username, id }).save({ events: [{ type, payload }] });if (error) throw error;return data;},{ fcnName: 'createCommit', useAuth: true, useAdmin: false, logger })

Type declaration

    • (root: any, variables: any, context: any): Promise<T>
    • Parameters

      • root: any
      • variables: any
      • context: any

      Returns Promise<T>

reloadEntities

reloadEntities: function = catchResolverErrors<boolean>(async (_,{ entityNames }: { entityNames: string[] },{ queryHandler }: ApolloContext): Promise<boolean> => {await reconcile(entityNames, queryHandler, logger);return Promise.resolve(true);},{ fcnName: 'reloadEntity', useAuth: true, useAdmin: true, logger })

Type declaration

    • (root: any, variables: any, context: any): Promise<T>
    • Parameters

      • root: any
      • variables: any
      • context: any

      Returns Promise<T>

ping

  • ping(_: any, __namedParameters: object, __namedParameters: object): Promise<boolean>
  • Parameters

    • _: any
    • __namedParameters: object
      • message: string
    • __namedParameters: object
      • pubSub: PubSub

    Returns Promise<boolean>

Query

Query: object

fullTextSearchCommit

fullTextSearchCommit: function = catchResolverErrors<Paginated<OutputCommit>>(async (_,{ query, cursor = 0, pagesize = 10, param }: FullTextSearchInput,{ queryHandler }: ApolloContext): Promise<Paginated<OutputCommit>> => {const paramJSON = param && JSON.parse(param);const { data, error, status } = await queryHandler.fullTextSearchCommit({query,cursor,pagesize,param: paramJSON,});// OutputCommit - "data" returns// items: [// {// id: 'qh_gql_test_counter_001',// entityName: 'counter',// commitId: '20210215044613772',// mspId: 'Org1MSP',// creator: 'admin-org1.net',// event: 'Increment',// entityId: 'qh_gql_test_counter_001',// version: 0,// ts: 1613364371883,// events: [Array]// }// ],if (status !== 'OK') throw new ApolloError(JSON.stringify(error));return data;},{ fcnName: 'fullTextSearchCommit', useAdmin: false, useAuth: true, logger })

Type declaration

    • (root: any, variables: any, context: any): Promise<T>
    • Parameters

      • root: any
      • variables: any
      • context: any

      Returns Promise<T>

fullTextSearchEntity

fullTextSearchEntity: function = catchResolverErrors<Paginated<any>>(async (_,{entityName,query,cursor = 0,pagesize = 10,param,}: { entityName: string } & FullTextSearchInput,{ queryHandler }: ApolloContext): Promise<Paginated<any>> => {if (!entityName) throw new UserInputError('entityName is missing');const paramJSON = param && JSON.parse(param);const { data, error, status } = await queryHandler.fullTextSearchEntity({entityName,query,pagesize,cursor,param: paramJSON,});// e.g. OutputCounter - "data" returns// items: [// {// createdAt: '1613366214804',// creator: 'admin-org1.net',// description: 'my desc',// eventInvolved: [Array],// id: 'qh_gql_test_counter_001',// tags: [Array],// timestamp: '1613366214804',// value: 1// }// ],if (status !== 'OK') throw new ApolloError(JSON.stringify(error));return data;},{ fcnName: 'fullTextSearchEntity', useAdmin: false, useAuth: true, logger })

Type declaration

    • (root: any, variables: any, context: any): Promise<T>
    • Parameters

      • root: any
      • variables: any
      • context: any

      Returns Promise<T>

getNotification

getNotification: function = catchResolverErrors<Notification[]>(async (_,{ entityName, commitId, id }: { entityName: string; commitId: string; id: string },{ queryHandler, username }: ApolloContext) => {const { data, error, status } = await queryHandler.getNotification({creator: username,entityName,commitId,id,});if (status !== 'OK') throw new ApolloError(JSON.stringify(error));return Object.entries(data).map(([key, value]) => {const keypart = key.split(':');return {creator: keypart[1],entityName: keypart[2],id: keypart[3],commitId: keypart[4],read: value === '0',} as Notification;}).reverse();},{ fcnName: 'getNotification', useAdmin: false, useAuth: true, logger })

Type declaration

    • (root: any, variables: any, context: any): Promise<T>
    • Parameters

      • root: any
      • variables: any
      • context: any

      Returns Promise<T>

getNotifications

getNotifications: function = catchResolverErrors<Notification[]>(async (_, __, { queryHandler, username }: ApolloContext): Promise<Notification[]> => {const { data, error, status } = await queryHandler.getNotifications({ creator: username });if (status !== 'OK') throw new ApolloError(JSON.stringify(error));return Object.entries(data).map(([key, value]) => {const keypart = key.split(':');return {creator: keypart[1],entityName: keypart[2],id: keypart[3],commitId: keypart[4],read: value === '0',} as Notification;}).reverse();},{ fcnName: 'getNotifications', useAdmin: false, useAuth: true, logger })

Type declaration

    • (root: any, variables: any, context: any): Promise<T>
    • Parameters

      • root: any
      • variables: any
      • context: any

      Returns Promise<T>

me

  • me(): string
  • Returns string

Subscription

Subscription: object

entityAdded

entityAdded: object

subscribe

subscribe: ResolverFn = withFilter((_, { entityName }: { entityName: string }, { pubSub }: ApolloContext) =>pubSub.asyncIterator(`${COMMIT_ARRIVED}`),({ entityAdded }, variables) => entityAdded.commit.entityName === variables.entityName)

pong

pong: object

subscribe

  • subscribe(_: any, __: any, __namedParameters: object): AsyncIterator<unknown, any, undefined>
  • Parameters

    • _: any
    • __: any
    • __namedParameters: object
      • pubSub: PubSub

    Returns AsyncIterator<unknown, any, undefined>

systemEvent

systemEvent: object

subscribe

  • subscribe(_: any, __: any, __namedParameters: object): AsyncIterator<unknown, any, undefined>
  • Parameters

    • _: any
    • __: any
    • __namedParameters: object
      • pubSub: PubSub

    Returns AsyncIterator<unknown, any, undefined>

Const resolvers

resolvers: object

Query

Query: object

getOrgById

getOrgById: function = catchResolverErrors(async (_, { mspId }, { dataSources: { organization }}: OrgContext) => {const { data, status, error } = await organization.repo.fullTextSearchEntity({entityName: ORGAN_NAME,query: `@id:${mspId}`,cursor: 0,pagesize: 1,});if (status !== 'OK') throw new Error(util.format(`'getOrgById': getting ${ORGAN_NAME} failed, %j`, error));return data?.items[0];}, { fcnName: 'getOrgById', logger, useAuth: false })

Type declaration

    • (root: any, variables: any, context: any): Promise<T>
    • Parameters

      • root: any
      • variables: any
      • context: any

      Returns Promise<T>

pubkey

pubkey: function = catchResolverErrors(async (_, __, { dataSources: { organization }, mspId }) => {const { data, status, error } = await organization.repo.fullTextSearchEntity({entityName: ORGAN_NAME,query: `@id:${mspId}`,cursor: 0,pagesize: 1,});if (status !== 'OK') throw new Error(util.format(`'pubkey': getting ${ORGAN_NAME} failed, %j`, error));return data?.items[0].pubkey;}, { fcnName: 'pubkey', logger, useAuth: false })

Type declaration

    • (root: any, variables: any, context: any): Promise<T>
    • Parameters

      • root: any
      • variables: any
      • context: any

      Returns Promise<T>

us

us: function = catchResolverErrors(async (__, _, { dataSources: { organization }, mspId }: OrgContext) => {const { data, status, error } = await organization.repo.fullTextSearchEntity({entityName: ORGAN_NAME,query: `@id:${mspId}`,cursor: 0,pagesize: 1,});if (status !== 'OK') throw new Error(util.format(`'us': getting ${ORGAN_NAME} failed, %j`, error));return data?.items[0];}, { fcnName: 'us', logger, useAuth: false })

Type declaration

    • (root: any, variables: any, context: any): Promise<T>
    • Parameters

      • root: any
      • variables: any
      • context: any

      Returns Promise<T>

_Organization

_Organization: object

__resolveReference

__resolveReference: function = catchResolverErrors(async ({ mspId }, { dataSources: { organization }}: OrgContext) => {const { data, status, error } = await organization.repo.fullTextSearchEntity({entityName: ORGAN_NAME,query: `@id:${mspId}`,cursor: 0,pagesize: 1,});if (status !== 'OK') throw new Error(util.format(`'__resolveReference': getting ${ORGAN_NAME} failed, %j`, error));return data?.items[0];}, { fcnName: '_Organization/__resolveReference', logger, useAuth: false })

Type declaration

    • (root: any, variables: any, context: any): Promise<T>
    • Parameters

      • root: any
      • variables: any
      • context: any

      Returns Promise<T>

Const resolvers

resolvers: object

Mutation

Mutation: object

createUser

createUser: function = catchResolverErrors(async (_,{ name, userId }: { name: string; userId: string },// TODO: username is used by legacy auth-server; enrollment_id by auth0{ dataSources: { user }, username, enrollment_id }: UserContext): Promise<Commit> =>userCommandHandler({enrollmentId: username || enrollment_id,userRepo: user.repo,}).CreateUser({userId,payload: { name, timestamp: Date.now() },}),{ fcnName: 'createUser', logger, useAuth: false })

Type declaration

    • (root: any, variables: any, context: any): Promise<T>
    • Parameters

      • root: any
      • variables: any
      • context: any

      Returns Promise<T>

Query

Query: object

getCommitsByUserId

getCommitsByUserId: function = catchResolverErrors(async (_,{ userId }: { userId: string },{dataSources: {user: { repo },},}: UserContext): Promise<Commit[]> => repo.getCommitById({ id: userId }).then(({ data }) => data || []),{ fcnName: 'getCommitsByUserId', logger, useAuth: false })

Type declaration

    • (root: any, variables: any, context: any): Promise<T>
    • Parameters

      • root: any
      • variables: any
      • context: any

      Returns Promise<T>

getPaginatedUser

getPaginatedUser: function = catchResolverErrors(async (_,{ cursor, pageSize }: { cursor: number; pageSize: number },{dataSources: {user: { repo },},}: UserContext): Promise<Paginated<User>> => {const { data, status, error } = await repo.fullTextSearchEntity({entityName: 'user',query: '',cursor: cursor ?? 0,pagesize: pageSize,});if (status !== 'OK') throw new ApolloError(JSON.stringify(error));return data;},{ fcnName: 'getPaginatedUser', logger, useAuth: false })

Type declaration

    • (root: any, variables: any, context: any): Promise<T>
    • Parameters

      • root: any
      • variables: any
      • context: any

      Returns Promise<T>

getUserById

getUserById: function = catchResolverErrors(async (_,{ userId }: { userId: string },{dataSources: {user: { repo },},username,}: UserContext): Promise<User> => {const { data, status, error } = await repo.fullTextSearchEntity({entityName: 'document',query: `@id:${userId}`,cursor: 0,pagesize: 1,});if (status !== 'OK') throw new ApolloError(JSON.stringify(error));return data?.items[0];},{ fcnName: 'getUserById', logger, useAuth: true })

Type declaration

    • (root: any, variables: any, context: any): Promise<T>
    • Parameters

      • root: any
      • variables: any
      • context: any

      Returns Promise<T>

searchUserByFields

searchUserByFields: function = catchResolverErrors(async (_,{ where }: { where: string },{dataSources: {user: { repo },},}: UserContext): Promise<User[]> => {const whereJSON = JSON.parse(where);const [key, value] = Object.entries(whereJSON)[0];const { data, status, error } = await repo.fullTextSearchEntity({entityName: 'user',query: `@${key}:${value}*`,cursor: 0,pagesize: 100,});if (status !== 'OK') throw new ApolloError(JSON.stringify(error));return data?.items || [];},{ fcnName: 'searchUserByFields', logger, useAuth: false })

Type declaration

    • (root: any, variables: any, context: any): Promise<T>
    • Parameters

      • root: any
      • variables: any
      • context: any

      Returns Promise<T>

searchUserContains

searchUserContains: function = catchResolverErrors(async (_,{ contains },{dataSources: {user: { repo },},}: UserContext): Promise<User[]> => {const { data, status, error } = await repo.fullTextSearchEntity({entityName: 'user',query: `@name:${contains}*`,cursor: 0,pagesize: 100,});if (status !== 'OK') throw new ApolloError(JSON.stringify(error));return data?.items || [];},{ fcnName: 'searchUserContains', logger, useAuth: false })

Type declaration

    • (root: any, variables: any, context: any): Promise<T>
    • Parameters

      • root: any
      • variables: any
      • context: any

      Returns Promise<T>

me

  • me(): Promise<object>
  • Returns Promise<object>

UserResponse

UserResponse: object

__resolveType

  • __resolveType(obj: any): "UserCommit" | "UserError"
  • Parameters

    • obj: any

    Returns "UserCommit" | "UserError"

Const userIndices

userIndices: object

id

id: object

index

index: object

sortable

sortable: true = true

type

type: string = "TEXT"

name

name: object

index

index: object

sortable

sortable: true = true

type

type: string = "TEXT"

userId

userId: object

index

index: object

sortable

sortable: true = true

type

type: string = "TEXT"