Package com.complexible.stardog.graphql
Interface GraphQLSchemaManager
-
public interface GraphQLSchemaManagerInterface for the storage and retrieval of GraphQL schemas.
- Since:
- 5.1
- Version:
- 5.1
- Author:
- Evren Sirin
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_SCHEMA
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddSchema(java.lang.String name, graphql.schema.GraphQLSchema schema)Adds a new GraphQLSchema to this databasevoidclearSchemas()Clears all schemasgraphql.schema.GraphQLSchemagetSchema(java.lang.String name)Returns the schema with the given namejava.lang.Iterable<java.lang.String>getSchemas()Returns all the GraphQL schemas associated with this databasevoidremoveSchema(java.lang.String name)Removes the specified schemavoidupdateSchema(java.lang.String name, graphql.schema.GraphQLSchema schema)Updates an existing GraphQLSchema in the database, or adds the schema if an existing schema is not found.
-
-
-
Field Detail
-
DEFAULT_SCHEMA
static final java.lang.String DEFAULT_SCHEMA
- See Also:
- Constant Field Values
-
-
Method Detail
-
getSchema
graphql.schema.GraphQLSchema getSchema(java.lang.String name) throws StardogExceptionReturns the schema with the given name- Parameters:
name- name of the schema- Returns:
- GraphQL schema
- Throws:
StardogException
-
getSchemas
java.lang.Iterable<java.lang.String> getSchemas() throws StardogExceptionReturns all the GraphQL schemas associated with this database- Returns:
- the schemas associated with this database
- Throws:
StardogException- if there was an error getting the constraints
-
addSchema
void addSchema(java.lang.String name, graphql.schema.GraphQLSchema schema) throws StardogExceptionAdds a new GraphQLSchema to this database- Parameters:
name- name of the schema to addschema-- Throws:
StardogException
-
updateSchema
void updateSchema(java.lang.String name, graphql.schema.GraphQLSchema schema) throws StardogExceptionUpdates an existing GraphQLSchema in the database, or adds the schema if an existing schema is not found.- Parameters:
name- name of the schema to updateschema- the next version of the schema- Throws:
StardogException
-
removeSchema
void removeSchema(java.lang.String name) throws StardogExceptionRemoves the specified schema- Parameters:
name- the name of the schema to remove- Throws:
StardogException- if there was an error while removing
-
clearSchemas
void clearSchemas() throws StardogExceptionClears all schemas- Throws:
StardogException- if there was an error while clearing the schemas
-
-