Skip to content

Action only fields cannot be excluded when referenced via another action #1871

@Swahvay

Description

@Swahvay

If an action has action only fields, and then is reference itself in an action only field for a second action, you cannot exclude any of those original action only fields.

// Schema1
actions: [
  {
    operation: ActionOperation.Edit,
    actionName: 'EditFirstEntAction',
    inputName: 'EditFirstEntInput',
    hideFromGraphQL: true,
    actionOnlyFields: [
      {
        name: 'specialActionOnlyField',
        type: 'Boolean',
        optional: true,
      },
    ],
  },
],
// Schema2
actions: [
  {
    operation: ActionOperation.Edit,
    actionName: 'EditSecondEntAction',
    inputName: 'EditSecondEntInput',
    hideFromGraphQL: true,
    actionOnlyFields: [
      {
        name: 'actionReference',
        type: 'Object',
        actionName: 'EditFirstEntAction',
        excludedFields: [
          'specialActionOnlyField',
        ],
      },
    ],
  },
],

So in this scenario, EditSecondEntAction would still include the specialActionOnlyField in its input.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions