dgraph-io/dgraph · error
%s field for the local type %s is not present in the remote
Error message
%s field for the local type %s is not present in the remote type %s
What it means
For each field of a local remote-resolved type, matchRemoteTypes searches the corresponding remote type's fields for a same-named field. If no remote field matches, this error reports which field of which local type is missing on which remote type.
Source
Thrown at graphql/schema/remote.go:387
return errors.Errorf(
"Unable to find local type %s in the remote schema",
typeName,
)
}
remoteFields := remoteType.Fields
if remoteFields == nil {
// Get fields for INPUT_OBJECT
remoteFields = remoteType.InputFields
}
for _, field := range fields {
var remoteField *gqlField = nil
for _, rf := range remoteFields {
if rf.Name == field.Name {
remoteField = rf
}
}
if remoteField == nil {
return errors.Errorf(
"%s field for the local type %s is not present in the remote type %s",
field.Name, typeName, remoteType.Name,
)
}
if remoteField.Type.String() != field.Type.String() {
return errors.Errorf(
"expected type for the field %s is %s but got %s in type %s",
remoteField.Name,
remoteField.Type.String(),
field.Type.String(),
typeName,
)
}
}
}
}
}
return nilView on GitHub (pinned to 759e242be6)
Solutions
- Remove the local field or rename it to match the remote type's field name.
- If the field was recently removed remotely, restore it or add a @remote-resolved replacement pointing at an existing field.
- Add a CI check that diffs local remote-resolved types against fresh remote introspection to catch drift early.
Example fix
// before
type User @remote { id: ID!, email: String! }
// remote User no longer has `email`; after
type User @remote { id: ID!, contactEmail: String! } Defensive patterns
Strategy: validation
Validate before calling
for (const field of localRemoteType.fields) {
if (!remoteType.fields.some(f => f.name === field.name)) throw new Error(`field ${field.name} missing on remote type ${remoteType.name}`)
} Type guard
function fieldExistsOnRemote(remoteType, fieldName) { return remoteType?.fields?.some(f => f.name === fieldName) ?? false } Prevention
- Diff local remote-resolved types against remote introspection in CI on every remote deploy
- Remove local fields immediately when the remote field is deprecated
- Subscribe to remote API change feeds/changelogs
When it happens
Trigger: In matchRemoteTypes, the loop over remoteFields finds no rf.Name == field.Name, leaving remoteField nil (graphql/schema/remote.go:387) — a local field has no counterpart on the remote type.
Common situations: Remote API removed or renamed a field the local schema still exposes; local schema added a convenience field assuming remote support; version drift between local SDL and remote schema.
Related errors
- %s `%s` is not present in remote schema.
- POST method cannot have query parameters in url: %s
- while json unmarshaling result from remote introspection que
- remote schema doesn't have any queries.
- remote schema doesn't have any mutations.
AI-assisted analysis of dgraph-io/dgraph@759e242be6 (2026-09-01).
Data as JSON: /api/errors/2f7b44bd18c65e11.
Report an issue: GitHub.