Questions tagged [postgraphile]

A GraphQL API created by reflection over a PostgreSQL schema. Formerly PostGraphQL.

https://github.com/graphile/postgraphile

118 questions
0
votes
0 answers

PostGraphile - exportGqlSchemaPath renames primary uuid column from id to rowId?

I'm new to GraphQL and I'm using Relay as my client and PostGraphile as my schema generator. My database is based on this PostgreSQL Schema Design. My tables are person, post and image and the primary key is a column called id with type uuid. When…
Kirk Ross
  • 6,413
  • 13
  • 61
  • 104
0
votes
0 answers

Graphile/starter, docker mode -- changes aren't reflected in browser?

I'm new to docker development and experimenting with Graphile/starter in docker mode. I've got it up and running with no issues and I've got the project open in a VSCode container as well. My potentially dumb question is, why aren't my HMTL or sass…
Kirk Ross
  • 6,413
  • 13
  • 61
  • 104
0
votes
1 answer

Procedurally generated queries/mutations from postgraphile GraphQL

I don't believe its a big deal, but my GraphIQL generates all of its queries and mutations from my PSQL schema. Is it possible to have it general a file for me with each change that I can use directly in my project? As currently I am having to write…
Jamie Hutber
  • 26,790
  • 46
  • 179
  • 291
0
votes
2 answers

How to Graphql Observable response to array

How can I convert postgraphile response to ng array? my query from my graphqlclient is : query MyQuery { messages { nodes { message } } } here is my response: (**** let gimsData=client.request(query) *****) { "data": { …
0
votes
1 answer

Postgraphile order by result of calculation (with input)

Some context: My table has two columns, longitude and latitude. I want to be able to create a query that can receive an input of a longitude, latitude and a number that represents the maximum number of kilometers distance. The query will return the…
Max
  • 907
  • 2
  • 13
  • 27
0
votes
1 answer

Function made of transaction statement on PostgreSQL

I want to authenticate an user by its nickname (networkId) and before-hand hashed password, with an user public table (recoyx.user) and an user private table (recoyx_private.user). The function is based on browsing this PostGraphile tutorial…
user5066707
0
votes
0 answers

PostGraphile - ordering results by specific id

so I'm trying to do a query that fetches a certain id first. i know the sql syntax is something along the lines of - SELECT id, name, colour FROM books ORDER BY id=2 desc; i am trying to figure out how to do the same thing in a postgraphile query…
0
votes
1 answer

How to access postgraphile route inside the server

I created postgraphile route in my server and in my app.ts there’s this line: app.use(postgraphileRoute) Now, I want to access this route in my repository. I’m using graphql-request package and I don’t know which url I send when I do new…
Jane
  • 13
  • 4
0
votes
1 answer

PostGraphile and Swift (SwiftUI) Integration

I am looking to build a client for a website, the api the website provides is with postGraphile https://api.twetch.app/v1/graphiql . I have been struggling to integrate this with Swift. If anyone has any resources on this it would be greatly…
0
votes
1 answer

Postgres function - Compose array of objects from multiple queries

I have the following dataset here create table categories( id serial primary key, parent_id integer, name varchar(255) not null ); create table entry( id serial primary key, location_id varchar(255) not null, location_string…
Ionut Milas
  • 318
  • 1
  • 11
0
votes
1 answer

Usage of Fastify JWT with postgraphile

I am trying to setup postgraphile with fastify server and it worked as expected. Now I added authentication middleware using a fastify-jwt plugin to graphql endpoint exposed by postgraphile but when I access the graphql endpoint using graphql IDE I…
thotam
  • 941
  • 2
  • 16
  • 31
0
votes
1 answer

How do I run relay-compiler as an offline build step, when my GraphQL schema is auto-generated by postgraphile (in its own container) at runtime?

I'm building a web app whose file structure looks something like this: db/ Dockerfile init/ 00-init.sql graphql/ Dockerfile app/ Dockerfile package.json bin/ www public/ index.html index.js app.js frontend/ …
awforsythe
  • 161
  • 4
  • 13
0
votes
1 answer

Setting local config in SQL before INSERT

newbie in SQL coming from a JS world needing some advice on triggers. My user has an id column and my GraphQL API always calls INSERT INTO .... RETURNING * and then doing the transforms on the GraphQL layer to return what I want. The goal is to…
0
votes
1 answer

Apollo Federation: does Federation replace delegateToSchema?

Short version: Can I use Apollo Federation to replace the functionality of delegateToSchema, and if so, how? The idea is to reuse resolver logic from another service that is a black-box. Long version: I've been scouring the internet for hours trying…
0
votes
1 answer

Field Authorization level with Postgraphile

Currently, I'm working with Postgraphile and I need to enforce permissions at data/field level. For example, I have a carmodel table, with my query is something like: { carmodel { id name description …
Thiago Loureiro
  • 1,041
  • 13
  • 24