
com.intuit.graphql.orchestrator.ServiceProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of graphql-orchestrator-java Show documentation
Show all versions of graphql-orchestrator-java Show documentation
GraphQL Orchestrator combines multiple graphql services into a single unified schema
package com.intuit.graphql.orchestrator;
import com.intuit.graphql.orchestrator.batch.QueryExecutor;
import java.util.Collections;
import java.util.Map;
import java.util.Set;
/**
* Represents a Service Provider.
*/
public interface ServiceProvider extends QueryExecutor {
/**
* The namespace needs to be unique per provider. This will be appended to each type of the service in the overall
* schema. This also helps keep the provider's types separate from the other providers and helps in type conflict
* resolution.
*
* @return A unique identifier for the service provider.
*/
String getNameSpace();
/**
* This will represent your graphql schema, you can keep it in single file as well as multiple files.
*
* @return The graphql schema files.
*/
Map sdlFiles();
default Set domainTypes() {
return Collections.emptySet();
}
default ServiceType getSeviceType() {
return ServiceType.GRAPHQL;
}
default boolean isFederationProvider() { return getSeviceType() == ServiceType.FEDERATION_SUBGRAPH; }
enum ServiceType {
FEDERATION_SUBGRAPH,
GRAPHQL,
REST
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy