TIL: How to use GraphQL variables to give my queries type safety

This page summarizes the projects mentioned and recommended in the original post on dev.to

SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
surveyjs.io
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
  • p4nth3rblog

    My 2021 personal blog site built with NextJS and Contentful — now deprecated.

  • // https://github.com/whitep4nth3r/p4nth3rblog/blob/main/contentful/Events.js import ContentfulApi from "@contentful/Api"; const defaultOptions = { future: true, }; /* * Get all events -- future by default */ static async getEvents(options = defaultOptions) { // Calculate date_ASC for future events, or date_DESC for past events const order = options.future ? "date_ASC" : "date_DESC"; // Generate today's date const date = new Date(); // And format it to an ISO String const formattedDate = date.toISOString(); // Decide on the date filter to pass in as a string const dateFilter = options.future ? "date_gt" : "date_lt"; // Construct variables object to send with the HTTP POST request const variables = { date: formattedDate, order }; // Build the query const query = `query GetEvents($date: DateTime!, $order: [EventOrder]!) { eventCollection(where: {${dateFilter}: $date}, order: $order) { items { sys { id } date name link description timeTbc isVirtual image { url description height width } } } }`; // Call out to the base API call const response = await this.callContentful(query, variables); const eventCollection = response.data.eventCollection.items ? response.data.eventCollection.items : []; return eventCollection; }

  • SurveyJS

    Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.

    SurveyJS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • How to load responsive images in AVIF and WebP using the HTML <picture> element

    2 projects | dev.to | 29 Nov 2021
  • Created Frontend Tools Showcase site with Next.js & Contentful

    3 projects | dev.to | 26 Aug 2021
  • How to add Algolia InstantSearch to your Next.js application

    1 project | dev.to | 5 Jul 2021
  • How to filter entries by linked references in GraphQL

    1 project | dev.to | 16 Jun 2021
  • Show HN: Replexica – AI-powered internationalization compiler for React (+ API)

    2 projects | news.ycombinator.com | 12 Apr 2024