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

Audit Relationship fields implementation #43

Closed
3 of 4 tasks
JedWatson opened this issue May 14, 2018 · 7 comments
Closed
3 of 4 tasks

Audit Relationship fields implementation #43

JedWatson opened this issue May 14, 2018 · 7 comments
Assignees

Comments

@JedWatson
Copy link
Member

JedWatson commented May 14, 2018

To finish implementing Relationships, we need to:

  • Nest the related list type in the GraphQL Schema
  • Implement the resolver for relationship types in the GraphQL Resolvers
  • Update the client-side query that loads relationships for the item and list views so they request the id of relationship field values, and don't just expecting a string
  • Add a custom renderer for Relationship fields in the List view that renders the name and links to the item, for the first 3 items in a relationship (then "... x more")

The last task will rely on having the ability to implement custom cell components ("views") for field types that are used by the List view in the Admin UI, which is technically possible but hasn't been done yet.

@JedWatson
Copy link
Member Author

JedWatson commented May 16, 2018

Further to-do items once the basics have landed:

  • Support full pagination / filtering / meta functionality for relationships in GraphQL as per the main list queries
  • Generate reverse relationship queries in the GraphQL (so if I relate posts to authors, authors could query for posts that link to them) -- this may be an actual field you need to define for the related list
  • Update the Field component to query a max. of 50 and use server-side filtering (this will be important when we can customise how lists are searched, at the moment it just uses the built-in react select filtering)

Then we should review the design for how reverse relationships are surfaced in the Admin UI. In Keystone 4 we had a separate section below the item form, we could go with that or do something different 🤷‍♂️

@jesstelford
Copy link
Contributor

Support full pagination / filtering / meta functionality for relationships in GraphQL as per the main list queries

Do you mean this?

{
  allPosts(author: {name: "Jed"}) {
    id
  }
}

I'm going to work on this now as there are two projects that require it.

@JedWatson
Copy link
Member Author

@jesstelford did this get resolved? or is it still pending?

@jesstelford
Copy link
Contributor

I'm not sure. It's been a while since I touched it and I know other work has been done elsewhere.

Probably needs an audit to see what's left.

@dominikwilkowski dominikwilkowski changed the title Wrap up Relationship fields implementation Audit Relationship fields implementation Aug 1, 2018
@molomby
Copy link
Member

molomby commented Sep 18, 2018

I'm also interested in how the relationship type maps into relational DBs; see #330.

@stale
Copy link

stale bot commented Feb 15, 2020

It looks like there hasn't been any activity here in over 6 months. Sorry about that! We've flagged this issue for special attention. It wil be manually reviewed by maintainers, not automatically closed. If you have any additional information please leave us a comment. It really helps! Thank you for you contribution. :)

@stale stale bot added the needs-review label Feb 15, 2020
@stale stale bot removed the needs-review label Apr 9, 2020
@MadeByMike
Copy link
Contributor

Most issues here solved. Making #2885 the canonical issue for additional relationship views.

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

5 participants