You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Returns a typed(type, attrs) helper bound to a specific subject map.
Type Parameters
TMap
TMapextendsRecord<string, object>
The subject map, e.g. SubjectMap<Resolvers, ResolversTypes>.
Returns
The typed helper.
<K>(type, attrs) => TMap[K] & {
__typename: K;
}
Remarks
Call once at the app level to tag plain objects with a required __typename
so CASL can classify them — both at runtime (detectSubjectType) and at the
type level, where the narrowed __typename makes the object satisfy a typed
GraphQLAbility's can/cannot subject parameter.