Deno is a V8-based scripting environment written in Rust & TypeScript aiming to provide a productive, secure scripting environment that a modern programmer needs. Deno aims to overcome all the design flaws and weaknesses of Node. Obsidian is a GraphQL caching client and server module built for Deno.
Obsidian provides a solution to one of the most troublesome aspects of GraphQL - caching. Being optimized for use in server-side rendered React apps built with Deno, enabling its most powerful features, including optimized caching client-server exchanges & super lightweight client-side caching, all that to support the needs of modern applications!
Features:
As already mentioned, the problem Obsidian wants to tackle is caching. When your query for data you will get the response from your GraphQL API containing raw data so it could be stored in your application. If you query for a specific property that is stored in the cache, the Obsidian algorithm will find and return it without querying the API once again. Furthermore, Obsidian will store in cache whole queries and responses to shorten lookup time to a minimum. If the algorithm won’t find any matching results in stored data (i.e cache was cleared), Obsidian will fetch them from the server once again.
To start using Obsidian we need to install it in both, the server and the client-side:
import { ObsidianRouter } from 'https://deno.land/x/[email protected]/mod.ts';
import { ObsidianWrapper } from 'https://deno.land/x/[email protected]/mod.ts';
The next steps are creating the router, sending `ObsidinaSchema’, creating a wrapper, then you are good to make your first query using Obsidian. To get more in-depth information make sure to visit Obsidian docs.
The GraphQL Editor is a supportive tool for both advanced GraphQL users as well as those taking their first steps with GraphQL APIs. Our all-in-one development environment for GraphQL will help you build, manage & deploy your GraphQL API much faster thanks to dozens of built-in micro features. Its graphical interface will also fix communication within your product team. Visualization is the key!