Skip to content

fix: duplicated description annotation on union fields #40

fix: duplicated description annotation on union fields

fix: duplicated description annotation on union fields #40

Triggered via pull request April 3, 2024 21:35
Status Failure
Total duration 21s
Artifacts

ci.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

2 errors
error: expect(received).toEqual(expected): test/plugin.test.ts#L32
Expected: "package com.kotlin.generated\n\nimport com.expediagroup.graphql.generator.annotations.*\n\n@GraphQLDescription(\"A description for MyType\")\ndata class MyType(\n val username: String? = null,\n @GraphQLDescription(\"A description for email\")\n val email: String? = null,\n @GraphQLDescription(\"A `weird` description for name\")\n val name: String? = null,\n @deprecated(\"Use something else instead\")\n val deprecated1: String? = null,\n @deprecated(\"\")\n val deprecated2: String? = null,\n @deprecated(\"Deprecated directive works too\")\n val deprecated3: String? = null,\n @deprecated(\"It only takes the first one\")\n val deprecated4: String? = null,\n @myunion\n @GraphQLDescription(\"DEPRECATED: It uses the GraphQLDescription annotation for union types\")\n val deprecated5: Any? = null,\n @myunion\n @GraphQLDescription(\"It uses the GraphQLDescription annotation for union types\")\n val deprecated6: Any? = null,\n @myunion\n @GraphQLDescription(\"When there is a description\")\n @deprecated(\"It puts the deprecated reason in @deprecated\")\n val deprecated7: Any? = null\n)\n\n@GraphQLUnion(\n name = \"MyUnion\",\n possibleTypes = [MyType::class],\n description = \"\"\n)\nannotation class MyUnion\n" Received: "package com.kotlin.generated\n\nimport com.expediagroup.graphql.generator.annotations.*\n\n@GraphQLDescription(\"A description for MyType\")\ndata class MyType(\n val username: String? = null,\n @GraphQLDescription(\"A description for email\")\n val email: String? = null,\n @GraphQLDescription(\"A `weird` description for name\")\n val name: String? = null,\n @deprecated(\"Use something else instead\")\n val deprecated1: String? = null,\n @deprecated(\"\")\n val deprecated2: String? = null,\n @deprecated(\"Deprecated directive works too\")\n val deprecated3: String? = null,\n @deprecated(\"It only takes the first one\")\n val deprecated4: String? = null,\n @myunion\n @GraphQLDescription(\"DEPRECATED: It uses the GraphQLDescription annotation for union types\")\n val deprecated5: Any? = null,\n @myunion\n @GraphQLDescription(\"It uses the GraphQLDescription annotation for union types\")\n val deprecated6: Any? = null,\n @myunion\n @GraphQLDescription(\"When there is a description\")\n @GraphQLDescription(\"It puts the deprecated reason in @deprecated\")\n val deprecated7: Any? = null\n)\n\n@GraphQLUnion(\n name = \"MyUnion\",\n possibleTypes = [MyType::class],\n description = \"\"\n)\nannotation class MyUnion\n" at /home/runner/work/graphql-kotlin-codegen/graphql-kotlin-codegen/test/plugin.test.ts:32:5
Tests
Process completed with exit code 1.