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 java.lang.String DEFAULT_SCHEMA  
    • Method Summary

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

      • getSchema

        graphql.schema.GraphQLSchema getSchema​(java.lang.String name)
                                        throws StardogException
        Returns 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 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​(java.lang.String name,
                       graphql.schema.GraphQLSchema schema)
                throws StardogException
        Adds a new GraphQLSchema to this database
        Parameters:
        name - name of the schema to add
        schema -
        Throws:
        StardogException
      • updateSchema

        void updateSchema​(java.lang.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
      • removeSchema

        void removeSchema​(java.lang.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