Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missed globalMiddlewares option in BuildSchemaOptions for type-graphql #240

Closed
manzonif opened this issue May 10, 2019 · 6 comments
Closed

Comments

@manzonif
Copy link

manzonif commented May 10, 2019

I'm submitting a...


[ ] Regression 
[ ] Bug report
[x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

In type-graphql the globalMiddlewares option is available, which allows executing middleware on a global level, on queries and resolvers. However, it is not included in the BuildSchemaOptions interface of this module.

Expected behavior

export interface BuildSchemaOptions {
    dateScalarMode?: DateScalarMode;
    scalarsMap?: ScalarsTypeMap[];
   globalMiddlewares?: Array<Middleware<any>>
}

Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Environment


Nest version: X.Y.Z

 
For Tooling issues:
- Node version: XX  
- Platform:  

Others:

@manzonif
Copy link
Author

Sorry, now I know that type-graphql middlewares can't be used in Nestjs.

@jogelin
Copy link

jogelin commented Jul 5, 2019

@manzonif did you succeed to add a middleware for graphql ? I would like to be able to get back response from the full resolution of a query: @query + @ResolveConfig. With interceptors I can only get the result of the Query...

@manzonif
Copy link
Author

manzonif commented Jul 5, 2019

@jogelin I solved my problem with NestInterceptor and GqlExecutionContext.
I am not aware of what @ResolveConfig is. Sorry.

@jogelin
Copy link

jogelin commented Jul 5, 2019

@jogelin I solved my problem with NestInterceptor and GqlExecutionContext.
I am not aware of what @ResolveConfig is. Sorry.

@manzonif Sorry I wanted to say @ResolveProperty()

It is related to #320 did you had this issue ?

@manzonif
Copy link
Author

manzonif commented Jul 5, 2019

@jogelin my problem was related to this issue.

@lock
Copy link

lock bot commented Apr 25, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants