facebook/relay · error
Not Implemented
Error message
Not Implemented
What it means
getDefaultActorIdentifier in the multi-actor-environment API is intentionally unimplemented; the module only provides utilities to build/split actor identifiers. Calling this method throws 'Not Implemented' — multi-actor environments require you to supply your own actor-identifier resolution.
Source
Thrown at packages/relay-runtime/multi-actor-environment/ActorIdentifier.js:39
const INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE: ActorIdentifier =
'INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE';
function assertInternalActorIdentifier(actorIdentifier: ActorIdentifier): void {
invariant(
actorIdentifier === INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE,
'Expected to use only internal version of the `actorIdentifier`. "%s" was provided.',
actorIdentifier,
);
}
module.exports = {
INTERNAL_ACTOR_IDENTIFIER_DO_NOT_USE,
assertInternalActorIdentifier,
getActorIdentifier(actorID: string): ActorIdentifier {
return actorID as ActorIdentifier;
},
getDefaultActorIdentifier(): ActorIdentifier {
throw new Error('Not Implemented');
},
};
View on GitHub (pinned to 668b1b85e0)
Solutions
- Provide your own actor identifier resolution when constructing the multi-actor environment instead of calling getDefaultActorIdentifier
- Only call getActorIdentifier(actorID) to construct explicit actor identifiers, or use assertInternalActorIdentifier for internal ids
- Avoid multi-actor APIs if you don't need them; use a standard RelayModernEnvironment
Example fix
// before
const id = env.getDefaultActorIdentifier();
// after
const id = getActorIdentifier('user:123'); // build an explicit ActorIdentifier Defensive patterns
Strategy: validation
Validate before calling
if (typeof env.getDefaultActorIdentifier === 'function') {
// multi-actor default resolution is not implemented; never call it
throw new Error('Provide explicit actor identifiers via getActorIdentifier(actorID)');
} Try / catch
try {
env.getDefaultActorIdentifier();
} catch (e) {
if (e.message === 'Not Implemented') {
// fall back to an explicit actor id derived from your session
}
} Prevention
- Always construct ActorIdentifiers explicitly with getActorIdentifier(actorID)
- Treat multi-actor-environment APIs as experimental and pin versions
- Wrap unimplemented APIs behind your own resolution layer
When it happens
Trigger: Calling MultiActorEnvironment's default actor resolution path, i.e. using a multi-actor setup (getActorIdentifier / actor-conditional queries) without providing a custom default actor identifier implementation.
Common situations: Adopting the experimental multi-actor-environment API (e.g. per-actor GraphQL fragments in fed-style schemas) and relying on the default implementation instead of overriding actor identification.
AI-assisted analysis of facebook/relay@668b1b85e0 (2026-09-02).
Data as JSON: /api/errors/a30eb9d5d1a88bf5.
Report an issue: GitHub.