Page Contents

Home > @loopback/graphql > GraphQLServer > resolver

GraphQLServer.resolver() method

Register a GraphQL resolver class

Signature:

resolver(resolverClass: Constructor<ResolverInterface<object>>, nameOrOptions?: string | BindingFromClassOptions): Binding<any>;

Parameters

Parameter Type Description
resolverClass Constructor<ResolverInterface<object>> GraphQL resolver class
nameOrOptions string | BindingFromClassOptions (Optional) Resolver name or binding options

Returns:

Binding<any>