automation should not construct searchResolver itself
Created by: slimsag
automation is currently constructing the search resolver itself in the GraphQL package:
This is brittle because it is only used by a8n and bypasses all of the other logic we execute before initializing a search resolver for regular GraphQL search queries:
I suggest you modify SearchRepos
to call into (&schemaResolver).Search(...)
because:
- It is easy for someone to add code to
(*schemaResolver).Search
that would breakSearchRepos
today. - By not reusing
(*schemaResolver).Search
, it would be harder to adopt paginated search in a8n in the future. - You are currently missing out on proper defaults like literal search and validation of your search queries due to this.
@mrnugget I am assigning you but unsure if you are the right owner, feel free to reassign