Git Product home page Git Product logo

Comments (8)

pgutkowski avatar pgutkowski commented on July 19, 2024

arg definitely should handle description. I've done quick investigation and found cause of this bug, it will be fixed soon.

Thank you very much for your feedback and kind words! I'm really happy that you have found this library useful.

from kgraphql.

Paradoxia avatar Paradoxia commented on July 19, 2024

After some more debugging I noticed that "deprecate" becomes the description.

.withArgs { arg<Int> { name = "page" defaultValue = 0 deprecate("becomes description") } }

from kgraphql.

pgutkowski avatar pgutkowski commented on July 19, 2024

That's true, I've messed up order of constructor arguments in DSL consumer, my bad, should have used explicit argument names.

from kgraphql.

pgutkowski avatar pgutkowski commented on July 19, 2024

@Paradoxia issue has been fixed and merged to master. It will come out with next release in coming days. Thank you for your report!

from kgraphql.

Paradoxia avatar Paradoxia commented on July 19, 2024

@pgutkowski Awesome thank you. I found a similar problem on property

type<Production> {
    property<String?>("country") {
        description = "Country description"
        resolver { production -> production.country }
    }
}


{
  __type(name: "Production") {
    name
    description
    fields {
      name
      description
      type {
        name
        description
        kind
        ofType {
          name
          description
          kind
        }
      }
    }
  }
}


---> Slice from result -->

{
  "name": "country",
  "description": null, <---- MISSING
  "type": {
    "name": "String",
    "description": "The String scalar type represents textual data, represented as UTF‐8 character sequences",
    "kind": "SCALAR",
    "ofType": null
  }
}

The query doesn't output the description i created for property "country".

from kgraphql.

pgutkowski avatar pgutkowski commented on July 19, 2024

It seems that you are doing the same thing as in #4, where property<> invocation ads new property which duplicates existing kotlin property.

Please try to add description with

type<Production> {
    property(Production::country) {
        description = "Country description"
    }
}

and see if description is missing.

In future there will be validation step added to ensure that extension properties do not shadow existing kotlin properties.

from kgraphql.

Paradoxia avatar Paradoxia commented on July 19, 2024

You are completely right. Code now works as expected. Handing out this 🥇 to you for your excellent library and support.

from kgraphql.

pgutkowski avatar pgutkowski commented on July 19, 2024

Thanks! Always happy to help 😄

from kgraphql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.