July 2020 Summaries
3 posts from Nhost
Filter
Month:
Year:
Post Summaries
Back to Blog
A JWT (JSON Web Token) is a string that carries user information such as user ID and roles, which is used to authorize GraphQL requests to Hasura. This token is sent in the Authorization header, prefixed with "Bearer," ensuring that Hasura can identify the user and enforce data access permissions. JWT tokens are created by an authentication server, which verifies user credentials and signs the token with a secret key shared with Hasura, ensuring the token's integrity. Key session variables like x-hasura-user-id, x-hasura-allowed-roles, and x-hasura-default-role are integral to JWT tokens for resolving user permissions. Tokens have an expiration time and are stored temporarily in the client's browser memory; they can be refreshed using a refresh token, which is linked to a user in the database and facilitates obtaining a new JWT token without re-authenticating. Hasura Backend Plus is a compatible authentication server for generating these tokens, and the nhost-js-sdk is used for automatic management of token storage and refresh processes.
Jul 09, 2020
641 words in the original blog post.
APIs have become increasingly popular due to the need for seamless data retrieval among various client applications, and while REST was the dominant method for a long time, GraphQL has emerged as a strong contender. Developed by Facebook in 2012, GraphQL was conceived to address the limitations of REST, particularly in terms of flexibility and efficiency when fetching data for client-side applications. GraphQL allows clients to request exactly the data they need with a single query, reducing overfetching and underfetching issues associated with REST, and it has been adopted by companies like Coursera, Twitter, and GitHub for its capabilities. However, GraphQL is not without its challenges, particularly in caching complexity and potential performance issues due to its flexible querying nature, which can lead to requesting excessive amounts of data in a single query. While GraphQL offers modern solutions and is gaining traction, it is important to note that it can coexist with REST within the same API architecture, and its community is continually evolving to address its current limitations.
Jul 05, 2020
2,062 words in the original blog post.
The Nhost blog has been inactive recently because the author participated in the Antler program in Stockholm to enhance Nhost's business prospects. As a result, two significant achievements have been realized: the addition of Nuno Pato as a co-founder and CTO, and the acquisition of a $110,000 pre-seed investment from Antler. Nuno Pato brings extensive experience from companies like CloudBees and Delivery Hero, bolstering Nhost's development capabilities. Nhost aims to become the Firebase of SQL and GraphQL while remaining fully open source, with ambitions to evolve into a platform similar to Netlify and Vercel for backend and potentially frontend services. The community is encouraged to participate in Nhost's development via their Discord server or by contacting them through email.
Jul 01, 2020
162 words in the original blog post.