This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.xing.one.engine | |
| import akka.http.scaladsl.model._ | |
| import com.xing.one.GraphqlEngine | |
| import com.xing.one.helpers.EngineSpecification | |
| import com.xing.one.helpers.Matchers._ | |
| class BasicInterfaceSpec extends EngineSpecification { | |
| isolated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class PreviewSchemaFilter extends DefaultAstSchemaBuilder[RequestContext] { | |
| override def extendObjectType(origin: MatOrigin, | |
| existing: ObjectType[RequestContext, _], | |
| extensions: List[TypeExtensionDefinition], | |
| fields: () => List[Field[RequestContext, Any]], | |
| interfaces: List[InterfaceType[RequestContext, Any]], | |
| mat: AstSchemaMaterializer[RequestContext]): ObjectType[RequestContext, Any] = { | |
| existing.asInstanceOf[ObjectType[RequestContext, Any]].copy(fieldsFn = () => fields().filterNot(_.tags.contains(Preview))) | |
| } |
OlderNewer