Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Swahvay opened this issue Dec 31, 2024 · 0 comments
Open

Comments

@Swahvay
Copy link
Contributor

Swahvay commented Dec 31, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant