Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Example Project / Usage #1

Open
BowlingX opened this issue Sep 30, 2019 · 4 comments
Open

Create Example Project / Usage #1

BowlingX opened this issue Sep 30, 2019 · 4 comments

Comments

@BowlingX
Copy link
Owner

Create a Mono repo of:

  • Frontend Project
  • Admin Project
  • Postgraphile Backend

The Project should have a simple Use Case (e.g. a Blog).

Features:

  • Authentication
@stephane-klein
Copy link

I created this example project https://github.com/stephane-klein/react-admin-and-postgraphile-playground based on https://github.com/BowlingX/ra-postgraphile

@BowlingX
Copy link
Owner Author

Thank you very much :).

@braco
Copy link

braco commented Jul 18, 2020

Regarding documentation/examples, one common pattern I haven't figured out is if there's a more efficient way to represent nested properties / join queries like this:

Postgraphile query:

  user(id: "1") {
    name
    userResources {
      nodes {
        added
        resource {
          name
        }
      }
    }
  }

userResources is a join table between user and resource. You would imagine the admin table would be resource.name | userResource.added under the user. It seems like react-admin encourages use of <ReferenceField>, but this fires off separate requests.

@BowlingX
Copy link
Owner Author

Yes, that's the concept of react-admin, because it comes from a more REST centric idea. Currently, we do not expose entities like that, if we detect an object we do not expand it automatically. You can change this behaviour by specifying the Type at queryValueToInputValueMap. (See https://github.com/BowlingX/ra-postgraphile#configuration). As this is currently quite limiting, I want to add a better configuration method were it's also possible to pass arguments to possible fields.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants