IBM Support

Limitations and propagation rules for the GraphQL @remove directive

Question & Answer


Question

What are the limitations and propagation rules of the GraphQL @remove directive?

Answer

The following limitations apply to use of the @remove directive.
  • The @remove directive cannot be used to remove the following types and fields.
    • Built-in scalar types.
    • Query, mutation, and subscription root operation types.
    • Arguments of built-in directives.
    • Non-null arguments of directives.
    • Input types of arguments of directives.
    • enum values used as default values of arguments of directives.
    • enum values used as default values of input fields.
    • All fields of an object or interface type.
    • All slicing arguments (if no assumedSize is provided).
    • All input fields of an input object type.
    • All values of an enum type.
    • Fields of interfaces.
    • Non-null input fields.
  • The $xpath extension function cannot be used in the use expression.
The following propagation rules apply to use of the @remove directive.
  • If a type (object, interface, union, enum, or scalar) is removed, fields returning that type must also be removed using the same expressions.
  • If an object type is removed, unions that reference that object must also be removed using the same expressions.
  • If a type (object, interface) that implements an interface is removed, fields returning that interface must also be removed using the same expressions.
  • If an interface is removed, all object types and interfaces that implement that interface must also be removed using the same expressions.
  • If a non-null argument on a field is removed, that field must also be removed using the same expression.
  • If an input type (input object, enum, scalar) is removed, optional field arguments of that input type must also be removed using the same expressions.
  • If an input type (input object, enum, scalar) is removed, fields with non-null arguments of that input type must also be removed using the same expressions.
  • If an input type (input object, enum, scalar) is removed, input fields of that input type must also be removed using the same expressions.
  • If an input field is removed, fields that define a nested slicing argument involving that field must also be removed using the same expressions.
  • If an input object type is removed, fields that define a nested slicing argument involving that type must also be removed using the same expressions.
  • If an enum value is removed, fields with an argument using that value as a default value must also be removed using the same expressions.

[{"Line of Business":{"code":"LOB45","label":"Automation"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SS9H2Y","label":"IBM DataPower Gateway"},"ARM Category":[{"code":"a8m50000000L0rqAAC","label":"DataPower"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"10.0.0"}]

Document Information

Modified date:
08 June 2021

UID

ibm16339179