https://kotlinlang.org logo
#graphql-kotlin
Title
# graphql-kotlin
a

Ashu Gairola

02/23/2022, 12:15 AM
Hi folks, Is there a way to add filters to graphQLRoutes that is automatically configured by graphql-kotlin-spring-server? Thanks!
d

Dariusz Kuc

02/23/2022, 4:50 AM
you can configure Webfilters but since
HandlerFilters
are applied programmatically I don't think there is a way to apply them without basically providing your own routes
🙏 1
a

Ashu Gairola

02/23/2022, 2:57 PM
Is there a way to disable the automatically configured route if providing custom routes?
d

Dariusz Kuc

02/23/2022, 4:57 PM
guessing you could exclude
GraphQLRoutesConfiguration
from auto configs (but make sure to add
GraphQLSchemaConfiguration
as it is automatically pulled in by that config)
🙏 1
a

Ashu Gairola

03/01/2022, 5:57 PM
I am not able to exclude the GraphQLRoutesConfiguration using
Copy code
@SpringBootApplication(exclude = [GraphQLRoutesConfiguration::class])
failing with error
Copy code
The following classes could not be excluded because they are not auto-configuration classes:
	- com.expediagroup.graphql.server.spring.GraphQLRoutesConfiguration
d

Dariusz Kuc

03/01/2022, 6:05 PM
then it is not possible to exclude it, you could try providing your own corouter as the primary but that is in the spring realm on how those would override each other (guess you would have to try it out)
3 Views