hasura

Calculating distance between a gps location and postgis geography value using a function?

烈酒焚心 提交于 2021-02-19 07:44:08
问题 I have lat and long values for a user. I have addresses of various locations saved in db. I want to find the nearest offers based on a radius value. I am using postgis. Currently my location column is of type geography. What is the format in which I should enter the data into "location" column geography type when I have only latitude and longitude? I cannot use postgis functions since I am using graphql to do data insert. I have been tearing my hair apart trying to write a function for this

How to update dynamically of multiple rows in one table using Graphql

▼魔方 西西 提交于 2021-02-07 14:55:24
问题 I am new to graphql hasura and i'm having this issue how to update multiple rows in one table, because usually i update only one row per table. i want to update multiple rows in a dynamic way I have for example existing rows data. id: 1, name: 'rosie', age: 12 id: 2, name: 'jane', age: 20 id: 3, name: 'rafaela', age: 25 and I want to edit the 2 rows only. id: 1, name: 'rosie update', age: 12 id: 2, name: 'jane update', age: 21 i have an array of users. it can be 1 or more than 1 users that

How to update dynamically of multiple rows in one table using Graphql

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-07 14:55:20
问题 I am new to graphql hasura and i'm having this issue how to update multiple rows in one table, because usually i update only one row per table. i want to update multiple rows in a dynamic way I have for example existing rows data. id: 1, name: 'rosie', age: 12 id: 2, name: 'jane', age: 20 id: 3, name: 'rafaela', age: 25 and I want to edit the 2 rows only. id: 1, name: 'rosie update', age: 12 id: 2, name: 'jane update', age: 21 i have an array of users. it can be 1 or more than 1 users that

Triggering a second GraphQL query based on data from initial query

蓝咒 提交于 2020-06-29 04:08:41
问题 Overview When WrappedApp initially loads, a query is sent to the GraphQL API to fetch the data (Tags). After this has completed a user can add an item to the ShortList in WrappedApp by clicking on a Tag in the TagsList (see screenshot below). Question How can I get this click of a Tag in the TagsList (i.e. security was clicked in the example below) to trigger the second GraphQL query named GQLSIMILARTAGS and render the result above the ShortList components data or at least console.log the