Skip to content

Commit c2139b2

Browse files
committed
Some more javadoc comments
1 parent 14907f4 commit c2139b2

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
package 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+
*/
38
public interface FragmentOrOperation extends Buildable {
49
}

client/api/src/main/java/io/smallrye/graphql/client/core/FragmentReference.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,26 @@
22

33
import static io.smallrye.graphql.client.core.utils.ServiceUtils.getNewInstanceOf;
44

5+
/**
6+
* Represents a reference to a named fragment.
7+
*/
58
public 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());

0 commit comments

Comments
 (0)