node-sql-template-strings
graphql-tag
Our great sponsors
node-sql-template-strings | graphql-tag | |
---|---|---|
6 | 7 | |
598 | 2,312 | |
- | 0.1% | |
0.0 | 4.6 | |
7 days ago | 3 months ago | |
JavaScript | TypeScript | |
ISC License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
node-sql-template-strings
-
Write SQL Queries With Confidence (TypeScript + Postgres)
Ah, I see it. I'm assuming node-sql-template-strings or an equivalent?
-
I thought I knew what I was doing
There is also some other interesting use cases.
- DenoDB
-
Slonik: A PostgreSQL client with strict types, detailed logging, and assertions
Any reason you chose that over node-sql-template-strings [1], which looks very similar?
[1] https://github.com/felixfbecker/node-sql-template-strings
-
How do I prevent SQL injection in this function? I am using pg-promise
sql-template-strings is a really simple and elegant solution for parameterized queries.
graphql-tag
-
How we migrated to Apollo Server 4
In Apollo Server 3, you could import the gql template literal tag directly from the apollo-server library. This template literal tag is provided by the graphql-tag library and allows parsing a GraphQL query string to an AST that can be used by Apollo and other GraphQL libraries.
-
Why do GQL strings need to be put through the gql function in JavaScript?
Handles parsing, some validation, normalizing and some sort of caching from what I can tell https://github.com/apollographql/graphql-tag/blob/main/src/index.ts
-
I thought I knew what I was doing
A common use of this feature is compilation of graphql queries, which looks like this.
- graphql-tag: A JavaScript template literal tag that parses GraphQL queries
-
Dealing with template strings
indentation in Relay.QL Relay and gql, graphql GraphQL template literals
-
Netflix open sources its GraphQL framework, written in Kotlin
By template strings I mean this (use of Javascript template literals in Apollo). We had a large SpringBoot REST API. Frontend added an Apollo server that simply called our backend and crammed it into a graphql response (ignoring all the work we did for pagination and caching). Later backend inherited this codebase and was forced to maintain it. Both teams spent many man hours on this endeavor with unclear tangible benefits.
-
Understanding Tagged Template Literal in JS
This features is so powerful that some awesome libraries were built on it such as Styled Components and graphql-tag.
What are some alternatives?
MySQL - A pure node.js JavaScript Client implementing the MySQL protocol.
web-mode - web template editing mode for emacs
slonik - A Node.js PostgreSQL client with runtime and build time type safety, and composable SQL.
styled-components - Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅
typed-knex - A TypeScript wrapper for Knex.js
vite - Next generation frontend tooling. It's fast!
PostgreSQL - PostgreSQL client for node.js.
apollo-server - 🌍 Spec-compliant and production ready JavaScript GraphQL server that lets you develop in a schema-first way. Built for Express, Connect, Hapi, Koa, and more.
dedent - ⬅️ ES6 string tag that strips indentation from multi-line strings.
postgres - Postgres.js - The Fastest full featured PostgreSQL client for Node.js, Deno, Bun and CloudFlare
trpc - 🧙♀️ Move Fast and Break Nothing. End-to-end typesafe APIs made easy.