Skip to content
Discussion options

You must be logged in to vote

I created a subclass of SelectionSetToObject that overrides transformSelectionSet method and use it in my BaseDocumentsVisitor instead.

Update the visitor selection set handler

 this.setSelectionSetHandler(new SelectionSetToFactory(...))

Plus

class SelectionSetToFactory<Config extends ParsedDocumentsConfig = ParsedDocumentsConfig> extends SelectionSetToObject<Config> {
  public transformSelectionSet() {
    return 'a new content here'
  }

  createNext(parentSchemaType: GraphQLNamedType, selectionSet: SelectionSetNode) {
    return new SelectionSetToFactory(this._processor, this._scalars, this._schema, this._convertName.bind(this), this._getFragmentSuffix.bind(this), this._loadedFragment…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ertrzyiks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant