hasura / hasura/graphql-engine

Unusual error message when attempting to track table through API

Open
#9,340 0 comments 0 reactions 0 assignees View on GitHub
k/bug t/product-platform
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Version Information

Server Version: docker image v2.6.1

### Environment

OSS

### What is the current behaviour?

I'm attempting to track a table with the API. I issued a request like the following:

```
{"type":"pg_track_table","args":{"source":"default","table":{"schema":"sgd6296","name":"update_source_vault_authorization"}}}
```

and ended up getting the following error:

```
Inconsistent object: cannot include "block$" in the GraphQL schema because it is not a valid GraphQL identifier
```

However, when I examine this schema in hasura, I don't see a table called `block$`.

Here are the tracked tables for the schema:
image

and here are the untracked tables for the schema:
image

That being said, there are other schemas in my database with tables called `block` but I'm not sure where the `$` suffix is coming from:

image

### What is the expected behaviour?

I expect the call to succeed or to fail for some other reason, not because of an unknown table in that specified schema.

### How to reproduce the issue?

I don't know.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the pg_track_table API request against the reported v2.6.1 environment and inspect how the specified PostgreSQL table is converted into the GraphQL schema. Trace where the unexpected block$ identifier is introduced; done means either the tracking request succeeds or returns an error that accurately identifies the actual cause and table.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, postgres
Domain
api, backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.