We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fcc1ace commit 9528ab8Copy full SHA for 9528ab8
packages/babel-plugin-relay/compileGraphQLTag.js
@@ -57,6 +57,18 @@ function compileGraphQLTag(
57
);
58
}
59
60
+ if (
61
+ definition.kind === 'FragmentDefinition' &&
62
+ definition.directives &&
63
+ definition.directives.some(d => d.name?.value === 'assignable')
64
+ ) {
65
+ // If the fragment is annotated with @assignable,
66
+ // the generated artifact isn't exporting anything,
67
+ // so we just cleanup the entire graphql tag.
68
+ path.remove();
69
+ return;
70
+ }
71
+
72
const eagerEsModules = state.opts?.eagerEsModules ?? false;
73
const isHasteMode = state.opts?.jsModuleFormat === 'haste';
74
const isDevVariable = state.opts?.isDevVariableName;
0 commit comments