We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
By using the applyMiddleware function to connect apollo-server to express you can pass on cors option. This cors option can be a Boolean or a CorsOptions object. The apollo-server-express uses the cors package. This package allows a third option to be passed: CorsOptionsDelegate. This option allows CORS to be configured asynchronously. Type definition: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/31483b781ac30f98bdf4d40a517e921f2fc2ce37/types/cors/index.d.ts#L25
applyMiddleware
apollo-server
express
cors
Boolean
CorsOptions
apollo-server-express
CorsOptionsDelegate
For the sake of completion this option should be available.
export interface GetMiddlewareOptions { cors?: corsMiddleware.CorsOptions | corsMiddleware.CorsOptionsDelegate | boolean; }
The text was updated successfully, but these errors were encountered:
Is this merged? Shouldn't this be closed?
Sorry, something went wrong.
No branches or pull requests
Packages used:
Expected
By using the
applyMiddleware
function to connectapollo-server
toexpress
you can pass oncors
option.This
cors
option can be aBoolean
or aCorsOptions
object.The
apollo-server-express
uses thecors
package.This package allows a third option to be passed:
CorsOptionsDelegate
.This option allows CORS to be configured asynchronously.
Type definition: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/31483b781ac30f98bdf4d40a517e921f2fc2ce37/types/cors/index.d.ts#L25
For the sake of completion this option should be available.
The text was updated successfully, but these errors were encountered: