这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@praveenweb
Copy link
Member

Description

To query schemas other than public, you can pass schema to resource in the format
<Resource name="schema.table" />.

For example to fetch data from schema test and table author, use the following snippet:

  <Resource name="test.author" list={list} />

Install the latest version

npm install --save ra-data-hasura@0.0.4

Affected components

  • Community Content

Related Issues

#1729

Solution and Design

Support multiple schemas using the "." separator.

Steps to test and verify

Limitations, known bugs & workarounds

@praveenweb praveenweb added the c/community Related to community content label Apr 25, 2019
@praveenweb praveenweb requested a review from shahidhk as a code owner April 25, 2019 06:31
@netlify
Copy link

netlify bot commented Apr 25, 2019

Deploy preview for hasura-docs ready!

Built with commit 0b29f3c

https://deploy-preview-2068--hasura-docs.netlify.com

Copy link
Member

@shahidhk shahidhk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the changes to package-lock required @praveenweb ?

@mnlbox
Copy link
Contributor

mnlbox commented Apr 28, 2019

@praveenweb, @shahidhk I test latest version of react-admin data provider
My schema name is online_exam and it not working with this schema name. I entered resource name like this:

<Resource name="online_exam.difficulty" icon={ModeIcon} list={DifficultyList} show={DifficultyShow} create={DifficultyCreate} edit={DifficultyEdit} options={{ label: 'Difficulty' }}/>

This is my error message in browser console:

Warning: Missing translation for key: "{"path":"$.args[0].args.order_by[0]","error":"\"id\" does not exist","code":"not-exists"}"

Any idea?

@praveenweb
Copy link
Member Author

@mnlbox - Does the table difficulty in the online_exam schema have the column id? The error seems to say that id does not exist.

Also it would be better if you can share the actual query that is made (check network tab?)

@mnlbox
Copy link
Contributor

mnlbox commented Apr 28, 2019

@praveenweb I check network tab, It seems it's return 2 query. One with schema: public, table: difficulty and one with schema: online_exam, table: difficulty. 🤔
Why it's sending 2 request?

@praveenweb
Copy link
Member Author

@mnlbox - May be you are calling twice with both difficulty and online_exam.difficulty?

@mnlbox
Copy link
Contributor

mnlbox commented May 5, 2019

It's workin OK, Can you merge this? I want add some new PR based on this 😉
@shahidhk
@praveenweb
@tirumaraiselvan

@shahidhk shahidhk changed the title add support for multiple schemas in ra-data-hasura (close #1729) ra-data-hasura: add support for multiple schemas (close #1729) May 6, 2019
@shahidhk shahidhk merged commit fc4638f into hasura:master May 6, 2019
@hasura-bot
Copy link
Contributor

Review app https://hge-ci-pull-2068.herokuapp.com is deleted

@praveenweb praveenweb deleted the react-admin-schema branch August 1, 2019 12:51
polRk pushed a commit to polRk/graphql-engine that referenced this pull request Feb 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c/community Related to community content

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants