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

Graph schema consistency enhancements #552

Closed
1 of 5 tasks
thescientist13 opened this issue Apr 11, 2021 · 3 comments · Fixed by #1266
Closed
1 of 5 tasks

Graph schema consistency enhancements #552

thescientist13 opened this issue Apr 11, 2021 · 3 comments · Fixed by #1266
Labels
alpha.7 Content as Data enhancement Improve something existing (e.g. no docs, new APIs, etc) v0.30.0
Milestone

Comments

@thescientist13
Copy link
Member

thescientist13 commented Apr 11, 2021

Type of Change

  • New Feature Request
  • Documentation / Website
  • Improvement / Suggestion
  • Bug
  • Other (please clarify below)

Summary

Make some enhancements / cleanups to the the graph schema

  1. Unique IDs
  2. Double MenuQuery Item

Details

Unique IDs

We should make sure all content gets a unique ID since right now it is just the filename without the extension. Could probably be based on a hash of the entire file page.

Double MenuQuery Item

The MenuQuery seems to return nested item.item which makes it a little clunky to interact with.

query($name: String, $route: String, $order: MenuOrderBy) {
  menu(name: $name, pathname: $route, orderBy: $order) {
    item {
      label,
      route
    }
    children {
      item {
        label,
        route
      },
      children {
        item {
          label,
          route
        }
      }
    }
  }
}

Wonder if there is a way to add some ergonomics here, or maybe give the sub items a better, more semantic name, like children?

@thescientist13 thescientist13 added enhancement Improve something existing (e.g. no docs, new APIs, etc) good first issue Good for newcomers Content as Data labels Apr 11, 2021
@thescientist13 thescientist13 added this to the 1.0 milestone Apr 11, 2021
@thescientist13 thescientist13 removed this from the 1.0 milestone Nov 11, 2021
@thescientist13 thescientist13 removed the good first issue Good for newcomers label Nov 11, 2021
@thescientist13
Copy link
Member Author

@thescientist13
Copy link
Member Author

Not sure if this is really that valuable on first refresh of this? I suppose can revisit post 1.0.

@thescientist13
Copy link
Member Author

Did a big graph refactor as part of #1167 / #1266 and now id is supported, so this can be resolved as part of that one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alpha.7 Content as Data enhancement Improve something existing (e.g. no docs, new APIs, etc) v0.30.0
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant