Package com.complexible.stardog.graphql

# Interface GraphQLSchemaManager

public interface GraphQLSchemaManager

Interface 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 final String`
  `DEFAULT_SCHEMA`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addSchema(String name, graphql.schema.GraphQLSchema schema)`
  Adds a new GraphQLSchema to this database
  `void`
  `clearSchemas()`
  Clears all schemas
  `graphql.schema.GraphQLSchema`
  `getSchema(String name)`
  Returns the schema with the given name
  `Iterable<String>`
  `getSchemas()`
  Returns all the GraphQL schemas associated with this database
  `void`
  `removeSchema(String name)`
  Removes the specified schema
  `void`
  `updateSchema(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 Details

  - ### DEFAULT_SCHEMA

    static final String DEFAULT_SCHEMA
    See Also:
      - Constant Field Values

- ## Method Details

  - ### getSchema

    graphql.schema.GraphQLSchema getSchema(String name) throws StardogException
    Returns the schema with the given name
    Parameters:
      `name` - name of the schema
    Returns:
      GraphQL schema
    Throws:
      `StardogException` - if there was any error reading

  - ### getSchemas

    Iterable<String> getSchemas() throws StardogException
    Returns 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(String name, graphql.schema.GraphQLSchema schema) throws StardogException
    Adds a new GraphQLSchema to this database
    Parameters:
      `name` - name of the schema to add
      `schema` - the schema to add
    Throws:
      `StardogException` - if there was an error writing to the index

  - ### updateSchema

    void updateSchema(String name, graphql.schema.GraphQLSchema schema) throws StardogException
    Updates an existing GraphQLSchema in the database, or adds the schema if an existing schema is not found.
    Parameters:
      `name` - name of the schema to update
      `schema` - the next version of the schema
    Throws:
      `StardogException` - if there was any error writing to the index

  - ### removeSchema

    void removeSchema(String name) throws StardogException
    Removes 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 StardogException
    Clears all schemas
    Throws:
      `StardogException` - if there was an error while clearing the schemas