File tree Expand file tree Collapse file tree 3 files changed +35
-0
lines changed
test/unit/should_honor_onlyTypes_when_implementing_external_interfaces Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ import { GraphQLKotlinCodegenConfig } from "../../../src/plugin" ;
2+
3+ export default {
4+ onlyTypes : [ "MyIncludedType" , "MyIncludedInterfaceInOnlyTypes" ] ,
5+ } satisfies GraphQLKotlinCodegenConfig ;
Original file line number Diff line number Diff line change 1+ package com.kotlin.generated
2+
3+ import com.expediagroup.graphql.generator.annotations.*
4+
5+ @GraphQLValidObjectLocations(locations = [GraphQLValidObjectLocations .Locations .OBJECT ])
6+ data class MyIncludedType (
7+ val field : String? = null ,
8+ val field2 : String
9+ )
10+
11+ interface MyIncludedInterfaceInOnlyTypes {
12+ val field: String?
13+ val field2: String
14+ }
Original file line number Diff line number Diff line change 1+ type MyIncludedType {
2+ field : String
3+ field2 : String !
4+ }
5+
6+ union MyExcludedUnion = MyIncludedType
7+
8+ interface MyIncludedInterfaceInOnlyTypes {
9+ field : String
10+ field2 : String !
11+ }
12+
13+ type MyExcludedType implements MyIncludedInterfaceInOnlyTypes {
14+ field : String
15+ field2 : String !
16+ }
You can’t perform that action at this time.
0 commit comments