specter-desktop icon indicating copy to clipboard operation
specter-desktop copied to clipboard

A GraphQL Extension

Open k9ert opened this issue 2 years ago • 1 comments

A GraphQL Extension. image

  • Will expose a /graphql endpoint
  • Creates a new callback of type middleware which starts as an empty array and the extensions can add fields to it.
  • As an example, the devhelp extension adds a field called "bookmarks" and you can do a query (on /graphql) like:
{
  bookmarks {
    title
    desc    
    
  }
}
  • Additionally, the extension is suppose to expose core-types. As an example, the users are exposed. Query like:
{
  users {
    username
    
  }
}

k9ert avatar Feb 11 '23 10:02 k9ert