4

I've got the following query:

query ChatRefetchContainerRefetchQuery(
  $arg: ID!
  $arg2: Boolean!
) {
  ...PeopleFragment
    @arguments(arg: $arg, arg2: $arg2)
}

What I want todo is unmask the ContainerFragment data OUTSIDE of the fragment. Usually you can use @relay(mask: false), however the relay compiler errors with the following message:

ERROR:
RelayMaskTransform: Cannot unmask fragment spread `PeopleFragment` with arguments. Use the `ApplyFragmentArgumentTransform` before flattening

Query that errors:

query ChatRefetchContainerRefetchQuery(
      $arg: ID!
      $arg2: Boolean!
    ) {
      ...PeopleFragment
        @arguments(arg: $arg, arg2: $arg2)
        @relay(mask: false)
    }
James111
  • 15,378
  • 15
  • 78
  • 121

1 Answers1

-1

the only way to fix it is like

query ChatRefetchContainerRefetchQuery( $arg: ID! $arg2: Boolean! ) { Peoples @arguments(arg: $arg, arg2: $arg2) { ...PeopleFragment @relay(mask: false) } }

Jan Toebes
  • 59
  • 1
  • 1