use of com.graphql_java_generator.client.GraphQLConfiguration in project graphql-maven-plugin-project by graphql-java-generator.
the class FullRequestIT method setupAll.
@BeforeAll
static void setupAll() throws GraphQLRequestPreparationException {
// We have one GraphQL endpoint. So we use the static configuration.
GraphQLRequest.setStaticConfiguration(new GraphQLConfiguration(GRAPHQL_ENDPOINT_URL));
// Let's build once the request, and use it for each further execution
boardsRequest = new GraphQLRequest("query{boards{id name topics {id}}}");
}
use of com.graphql_java_generator.client.GraphQLConfiguration in project graphql-maven-plugin-project by graphql-java-generator.
the class AbstractGraphQLRequest_fragmentTest method setup.
@BeforeEach
void setup() {
// Default configuration for GraphQLRequest
GraphQLRequest.setStaticConfiguration(new GraphQLConfiguration("http://localhost"));
// A useful init for some tests
input = new HumanInput();
input.setName("a new name");
List<Episode> episodes = new ArrayList<>();
episodes.add(Episode.JEDI);
episodes.add(Episode.EMPIRE);
episodes.add(Episode.NEWHOPE);
input.setAppearsIn(episodes);
params.put("humanInput", input);
params.put("value", "the mutation value");
params.put("anotherValue", "the other mutation value");
params.put("uppercaseFalse", false);
params.put("uppercaseTrue", true);
}
use of com.graphql_java_generator.client.GraphQLConfiguration in project graphql-maven-plugin-project by graphql-java-generator.
the class FullRequestWithFragmentIT method setupAll.
@BeforeAll
static void setupAll() throws GraphQLRequestPreparationException {
// We have one GraphQL endpoint. So we use the static configuration.
GraphQLRequest.setStaticConfiguration(new GraphQLConfiguration(GRAPHQL_ENDPOINT_URL));
// Let's build once the request, and use it for each further execution
boardsRequestWithGlobalFragments = new GraphQLRequest(//
"" + "fragment member on Member {name alias} " + "fragment post on Post {date content author{...member id}}\n" + "fragment topic on Topic {title posts(since: &sinceParam){id ...post} author{...member}}\r" + "query{boards{id name topics {id ...topic}}}");
// The same request, with inline fragments
boardsRequestWithInlineFragments = new GraphQLRequest(//
"" + //
"query{boards{" + //
" id name topics {" + //
" id ... on Topic {" + //
" title " + //
" posts(since: &sinceParam){id ... on Post {date content author{... on Member {name alias} id}} } " + //
" author{... on Member {name alias}}" + //
" } " + //
" }" + "}}");
}
Aggregations