graphql-platform icon indicating copy to clipboard operation
graphql-platform copied to clipboard

Add analyzers

Open glen-84 opened this issue 10 months ago • 1 comments

Product

Hot Chocolate

Is your feature request related to a problem?

Developers using the platform may not be following best practices.

The solution you'd like

Add analyzers such as:

  • [ ] Don't use .With(queryContext) and .Select together.
  • [x] Node resolver id argument doesn't need [ID].
  • [ ] Don't need [Service].
  • [ ] Somehow warn when the user doesn't have the HC.EF package installed.
  • [x] Encourage modern APIs (f.e. ObjectType<T>).
  • [ ] Specify requirements when using [Parent] and QueryContext.
  • [x] Order of middlewares
  • [ ] Not providing an IReadOnlyList<T> keys as the first argument of a dataloader
  • [x] Validate that BindMember binds a valid member
  • [x] Use source generator for root types aka make class partial
  • [x] Parent type check
  • [x] Dont use UseProjectionAttribute when using QueryContext<T>

glen-84 avatar Feb 26 '25 16:02 glen-84

https://github.com/ChilliCream/graphql-platform/pull/8845

michaelstaib avatar Oct 26 '25 22:10 michaelstaib