Class LiteralQuery
- java.lang.Object
-
- com.shopify.graphql.support.AbstractQuery<LiteralQuery>
-
- org.topbraidlive.client.java.graphql.platform.LiteralQuery
-
public class LiteralQuery extends AbstractQuery<LiteralQuery>
An RDF literal with a datatype, a string (lexical form) and an optional language tag.
-
-
Field Summary
-
Fields inherited from class com.shopify.graphql.support.AbstractQuery
_queryBuilder, ALIAS_SUFFIX_SEPARATOR, CUSTOM_FIELD_LABEL
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LiteralQuery
addFragmentReference(Fragment<LiteralQuery> fragment)
Adds aLiteralQuery
fragment reference at the current position of the query.static Fragment<LiteralQuery>
createFragment(String name, LiteralQueryDefinition queryDef)
Creates a GraphQL "named" fragment with the specified query type definition.LiteralQuery
datatype()
The URI of the datatype.LiteralQuery
lang()
The language tag such as "en".LiteralQuery
string()
The literal's string (lexical form).-
Methods inherited from class com.shopify.graphql.support.AbstractQuery
addCustomObjectField, addCustomSimpleField, appendQuotedString, startField, startInlineFragment, withAlias
-
-
-
-
Method Detail
-
datatype
public LiteralQuery datatype()
The URI of the datatype.
-
lang
public LiteralQuery lang()
The language tag such as "en". The empty string for anything but rdf:langString literals.
-
string
public LiteralQuery string()
The literal's string (lexical form).
-
createFragment
public static Fragment<LiteralQuery> createFragment(String name, LiteralQueryDefinition queryDef)
Creates a GraphQL "named" fragment with the specified query type definition. The generics nature of fragments ensures that a fragment can only be used at the right place in the GraphQL request.- Parameters:
name
- The name of the fragment, must be unique for a given GraphQL request.queryDef
- The fragment definition.- Returns:
- The fragment of a given generics type.
-
addFragmentReference
public LiteralQuery addFragmentReference(Fragment<LiteralQuery> fragment)
Adds aLiteralQuery
fragment reference at the current position of the query. For example for a fragment namedtest
, calling this method will add the reference...test
in the query. For GraphQL types implementing an interface, there will be some similar methods using the Query type of each implemented interface.- Parameters:
fragment
- The fragment to reference.
-
-