UNPKG

@leosprograms/vf-graphql-holochain

Version:

GraphQL schema bindings for the Holochain implementation of ValueFlows

43 lines (42 loc) 1.7 kB
/** * Agent queries * * :TODO: wire into Personas hApp and replace generated agent names with serving of profile data * * @package: hREA * @since: 2020-02-19 */ import { DNAIdMappings } from '../types.js'; import { Agent, AgentConnection, AgentEdge, Organization, OrganizationConnection, Person, PersonConnection } from '@leosprograms/vf-graphql'; import { AgentPubKey } from '@holochain/client'; import { PagingParams } from '../resolvers/zomeSearchInputTypes.js'; export interface RegistrationQueryParams { pubKey: AgentPubKey; } export declare type AgentWithType = Agent & { agentType: string; }; export interface AgentWithTypeResponse { agent: AgentWithType; } export interface AgentEdgeWithTypeEdge extends Omit<AgentEdge, 'node'> { node: AgentWithType; } export interface AgentConnectionWithType extends Omit<AgentConnection, 'edges'> { edges: AgentEdgeWithTypeEdge[]; } export declare function addAgentTypename(record: AgentWithType): Agent; declare const _default: (dnaConfig: DNAIdMappings, conductorUri: string) => { myAgent: (root: any, args: any) => Promise<Agent>; agent: (root: any, args: any) => Promise<Agent>; organization: (root: any, args: any) => Promise<Organization>; person: (root: any, args: any) => Promise<Person>; agents: (root: any, args: PagingParams) => Promise<AgentConnection>; organizations: (root: any, args: PagingParams) => Promise<OrganizationConnection>; people: (root: any, args: PagingParams) => Promise<PersonConnection>; agentRelationship: () => never; agentRelationships: () => never; agentRelationshipRole: () => never; agentRelationshipRoles: () => never; }; export default _default;