![]() The DELETE operation fully deletes an object from the system.If no ids are specified, then the entire collection of objects will be returned to the caller. When a list of ids is specified, it will only extract the set of objects within the relationship with matching ids. The FETCH operation retrieves a set of objects.Operations that edit or manipulate data are restricted to GraphQL Mutation queries: Operation The operations are separated into those that accept a data argument and those that accept an ids argument. Relationship OperationsĮlide GraphQL relationships support six operations which can be broken into two groups: data operations and id operations. Other objects through nested relationships.Įntity attributes generally do not take arguments. Each data object can be a complex subgraph which contains The data parameter is provided for operations that mutate the collection (UPSERT, UPDATE, and REPLACE), It containsĪ list of input objects that match the data type of the relationship.When not provided, this argumentĭefaults to a FETCH operation which simply reads the collection of edges. The op argument describes the operation to perform on the relationship. ![]() The parameters after and first are used to paginate a relationship across multiple API requests.The sort parameter is used to order a relationship’s edges by one or more node attributes.The filter parameter is used to build RSQL filter predicates that select zero or more nodes from a relationship.It is used to select one or more nodes from a relationship. The ids parameter is a collection of node identifiers.Set of arguments that either constrain the edges fetched from a relationship or supply data to a mutation: In GraphQL, any property in the schema can take arguments. The node is an instance of aĭata model which in turn contains its own attributes and set of relationships. Relationships are a collection of graph edges. Relationships in the entity relationship graph.Įlide models relationships following Relay’s Connection pattern. Elide’s GraphQL root documents consist of relationships to these rootable entities.Įach root relationship is named by its pluralized type name in the GraphQL root document.Īll other non-rootable entities in our schema must be referenced through traversal of the ![]() In Elide, entities can be marked if they are directly navigable from the root of the Elide’s GraphQL structure for queries and mutations is depicted below:Įvery GraphQL schema must define a root document which represents the root of the graph. Support filtering, sorting, and pagination. Query Objects are more complex than Input Objects since they do more than simply describe data they must The property names in the JPA annotated model: Input objects just contain attributes and relationship with names directly matching Relationships are links to other entities in the graph. The schema for both kinds of objects are derived from the entity relationship graph (defined by the JPA data model).īoth contain a set of attributes and relationships. Input Objects which are used to supply input data to mutations.Query objects which are used to compose queries and mutations.GraphQL splits its schema into two kinds of objects: Note that it is possible to receive a 200 HTTP OK from Elide but also have errors in the query. The ‘data’ field contains the graphQL response object, and the ‘errors’ field (only present when they exist) contains one or more errors encountered when executing the query. variables - Contains a json object of key/value pairs where the keys map to variable names in the query and the values map to the variable values.operationName - Used if multiple operations are present in the same query.Namely, ever GraphQL query is wrapped in a JSON envelope object with one required attribute and two optional attributes: It follows the convention defined by GraphQL for serving over HTTP. JSON EnvelopeĮlide accepts GraphQL queries embedded in HTTP POST requests. Perform any combination of the above edits together so they can happen atomically in a single request.Įlide offers an opinionated GraphQL API that addresses exactly how to do these things in a uniform way across your entire data model graph. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |