Skip to content

API for adding extensions in order to implement tracing #208

Closed
@keithrobichaud

Description

@keithrobichaud

Hello, first off I just want to say thanks for all the work everyone has put into this codebase, it's been awesome to work with so far!

I've noticed that there are some open issues in regards to adding better support for tracing, and I've spent a decent amount of time searching for answers but I was hoping that a post here would yield me to the ideal solution.

I spent a bit of time setting up some wrapped resolver functions as Jason suggests here: #94 (comment)
and this worked fine when I was using GraphQL::executeQuery as I could just directly do something like $result['extensions']['tracing'] = $traceData;
However, after switching to the StandardServer (needed to support batched queries) I was no longer able to use such a solution.

If there were a simple API for adding extensions onto the result executor that would be one simple solution for us. I looked through the codebase/docs and could not find anything. I don't mind opening a PR adding such support if it seems like something other people would find useful. I'm not sure what else extensions are used for outside of tracing, so if there was a native way to enable tracing that would be sufficient as well (seems like that may be a ways off though)

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions