File tree Expand file tree Collapse file tree
client/api/src/main/java/io/smallrye/graphql/client/core Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package io .smallrye .graphql .client .core ;
22
3+ /**
4+ * Represents a node in a GraphQL document that can contain either an operation (query/mutation/subscription),
5+ * or a definition of a named fragment. On the top level, a GraphQL document basically consists of a list
6+ * of these nodes.
7+ */
38public interface FragmentOrOperation extends Buildable {
49}
Original file line number Diff line number Diff line change 22
33import static io .smallrye .graphql .client .core .utils .ServiceUtils .getNewInstanceOf ;
44
5+ /**
6+ * Represents a reference to a named fragment.
7+ */
58public interface FragmentReference extends FieldOrFragment {
69
10+ /**
11+ * Create a fragment reference by specifying the name of the target fragment.
12+ * In the resulting document, this will appear as `...FRAGMENTNAME`
13+ */
714 static FragmentReference fragmentRef (String name ) {
815 FragmentReference ref = getNewInstanceOf (FragmentReference .class );
916 ref .setName (name );
1017 return ref ;
1118 }
1219
20+ /**
21+ * Create a fragment reference by providing a built instance of a named fragment.
22+ * This will actually only use the name of the fragment - in the resulting document,
23+ * this will appear as `...FRAGMENTNAME`
24+ */
1325 static FragmentReference fragmentRef (Fragment fragment ) {
1426 FragmentReference ref = getNewInstanceOf (FragmentReference .class );
1527 ref .setName (fragment .getName ());
You can’t perform that action at this time.
0 commit comments