A function that resolves the value for a single GraphQL field marked with @client.
@client
Resolver functions receive four parameters:
rootValue
args
context
requestContext
client
phase
info
The type of value returned by the resolver
The type of the parent object
The type of the request context
The type of the field arguments
const isLoggedInResolver: Resolver<boolean> = () => { return !!localStorage.getItem("token");}; Copy
const isLoggedInResolver: Resolver<boolean> = () => { return !!localStorage.getItem("token");};
A function that resolves the value for a single GraphQL field marked with
@client.Resolver functions receive four parameters:
rootValue: The parent object containing the result from the resolver on the parent fieldargs: Arguments passed to the fieldcontext: ContainsrequestContext,client, andphasepropertiesinfo: Information about the field being resolved