dotansimha/graphql-code-generator-community

CSharp plugin argument classes not created

Open

#104 建立於 2021年1月8日

在 GitHub 查看
 (0 留言) (1 反應) (0 負責人)TypeScript (195 fork)github user discovery
help wanted

倉庫指標

Star
 (136 star)
PR 合併指標
 (PR 指標待抓取)

描述

Describe the bug There are not created argument classes when using c sharp plugin

To Reproduce Extremely simple. Just compare homepage of this project (default is typescript in yml file ) to this for example

overwrite: true schema: schema.graphql generates: RimacCmvdsClient.Models/Models.cs: plugins: - c-sharp config: namespaceName: e scalars: DateTime: DateTime

QuerySearchArgs is missing !

Sandbox has timeouts but reproducing this is trivial. Just on home page of this site use c-sharp plugin

  1. My GraphQL schema:
scalar Date

schema {
  query: Query
}

type Query {
  me: User!
  user(id: ID!): User
  allUsers: [User]
  search(term: String!): [SearchResult!]!
  myChats: [Chat!]!
}

enum Role {
  USER,
  ADMIN,
}

interface Node {
  id: ID!
}

union SearchResult = User | Chat | ChatMessage

type User implements Node {
  id: ID!
  username: String!
  email: String!
  role: Role!
}

type Chat implements Node {
  id: ID!
  users: [User!]!
  messages: [ChatMessage!]!
}

type ChatMessage implements Node {
  id: ID!
  content: String!
  time: Date!
  user: User!
}

  1. My GraphQL operations:
# Put your operations here
  1. My codegen.yml config file:
overwrite: true
schema: schema.graphql
generates:
  RimacCmvdsClient.Models/Models.cs:
    plugins:
      - c-sharp
    config:
        namespaceName: e
        scalars:
            DateTime: DateTime

Expected behavior Created argument classes for arguments like in typescript plugin (classes with Args sufix)

Environment:

  • OS:
  • @graphql-codegen/...:
  • NodeJS: 14.15.4

Additional context

貢獻者指南