A GraphQL API created by reflection over a PostgreSQL schema. Formerly PostGraphQL.
Questions tagged [postgraphile]
118 questions
0
votes
1 answer
graphile worker job causing issue to plpgsql function
we using postgraphile in our project,
there is a graphile worker job in the task folder called email.ts
now i have a function in plpgsql with the below structure.
create or replace function public.function()
returns public.xyz as $$
begin
if…

Pratheek Reddy
- 103
- 1
- 8
0
votes
0 answers
Doesn't Heroku allow apps access other ports than 80 (default port)
Whole day I struggled for deployment on Heroku. It's a node based application that uses postgraphile for graphql query to AWS RDS PostgreSQL.
Deploy on Heroku was successfully done. DB was successfully migrated via Flyway.
And also I can see the web…

LEOSUNZ
- 31
- 4
0
votes
1 answer
PostGraphile: One-To-Many relationships
I inherited a database structure which works like this: I have two tables, one for Appointments and one for Visits. When someone makes an Appointment, they can describe certain Problems (a third table) to be addressed during a Visit. An Appointment…

user3810626
- 6,798
- 3
- 14
- 19
0
votes
1 answer
Graphql - how to omit tables from the auto-generated graphiql
Im working on postgraphile server. the stack is: nodejs, expressjs, postgraphile and knex.
My auto-generated graphiql exposes queries to tables it doesn't need to - knex_migrations.
following this doc:…

Itay Tur
- 683
- 1
- 15
- 40
0
votes
1 answer
Using Postgraphile in nodeJS, how to enable aggregate max of date field?
I am using postgraphile in NodeJS for graphql API based on Postgresql database. I need to get max(date_field), but postgraphile does not provide that option by default.
How can I enable aggregation of max on a date field?
I want something as…

Vinit Khandelwal
- 490
- 8
- 20
0
votes
1 answer
Error: relation tbl does not exist postgres
I have written a SQL function in PostgreSQL that accesses data from another table. On running the function, I am getting following error
relation table2 does not exist postgres
Here is the function that I am creating
CREATE OR REPLACE FUNCTION…

Vinit Khandelwal
- 490
- 8
- 20
0
votes
0 answers
Postgraphile /graphql hangs without errors
I have been scratching my head now for 2 whole days on this :D I thought initially it was the reverse proxy. However that was folly as of course, this could not be the case as the /graphiql endpoint was working perfectly. Just with no scheme…

Jamie Hutber
- 26,790
- 46
- 179
- 291
0
votes
2 answers
I can't revoke execute from function in custom schema
I want to revoke execute from app.my_function function, so users with role doctor can't call it, I can't figure out what wrong with my code, I spend the whole day trying to find a solution.
CREATE SCHEMA app;
CREATE ROLE doctor;
GRANT USAGE ON…

lawayben
- 33
- 1
- 8
0
votes
1 answer
Postgraphile VS custom graphql resolver/schema in express server
I was experimenting with Postgraphile and it is a great tool to auto-generate the GraphQL API but I am still a little bit confused why should I use it. (P.S. I am not very experienced with GraphQL and PostgreSQL.)
Question 1:
Can I think of it this…

calvert
- 631
- 10
- 33
0
votes
1 answer
In PostGraphile query filter 'or' operator is not working
Postgraphile filter or is working as and is working
When I was trying or in query filter and checked explained explorer i found it changed to and that's why its always working for and not for or
{
allCashierViewsList(
filter: {locationId:…

Anil
- 133
- 1
- 8
0
votes
1 answer
PostgreSQL -- JOIN UNNEST output with CTE INSERT ID -- INSERT many to many
In a PostgreSQL function, is it possible to join the result of UNNEST, which is an integer array from function input, with an ID returned from a CTE INSERT?
I have PostgreSQL tables like:
CREATE TABLE public.message (
id SERIAL PRIMARY KEY,
…

steve76
- 302
- 2
- 9
0
votes
1 answer
PostGraphile deleteEdge with many to many relation
I have this query, where messageTags is a joining table for a many to many relation between messages and tags
messageTagsByMessageId {
__id
edges {
node {
tagId
tagByTagId {
id
…

steve76
- 302
- 2
- 9
0
votes
1 answer
PostGraphile: pgSettings user.id in makeExtendSchemaPlugin
Is it possible to access pgSettings in a PostGraphile plugin, specifically makeExtendSchema? Here is my middleware:
app.use(
postgraphile(
process.env.DATABASE_URL,
"public",
{
watchPg: true,
…

steve76
- 302
- 2
- 9
0
votes
0 answers
GraphQL - resolve JSON as array of graphql types to support batch querying
I've got a collection of graphql services that are combined together in a gateway using graphql-tools schema stitching.
Here's some sample code for reference:
async function makeGatewaySchema() {
// define the remote executors, introspect the…
0
votes
1 answer
PostgreSQL - computed column to return "is my" boolean
I'm new to pg and dbs in general. I found a blog db boilerplate and I'm trying to add some computed columns to return Booleans for whether the currentPerson (the authenticated user) is the author of a post. Basically, a phantom column in the posts…

Kirk Ross
- 6,413
- 13
- 61
- 104