Code Monkey home page Code Monkey logo

Comments (6)

srinivasankavitha avatar srinivasankavitha commented on July 21, 2024 1

Ok, I see. At the time of adding this feature, our primary use case was to pick up schemas under META-INF and from other modules in a given project that has schemas under META-INF, so the current implementation addresses that requirement. But for other external dependencies it would not work as you just pointed out. We could enhance this implementation to scan for .graphqls files more generally as well I suppose.

from dgs-codegen.

srinivasankavitha avatar srinivasankavitha commented on July 21, 2024

Usually schema files are added under src/main/resources for graphql projects and hence we scan for the META-INF folder in codegen. Thanks for pointing out the documentation gap, we need to fix that.

from dgs-codegen.

srinivasankavitha avatar srinivasankavitha commented on July 21, 2024

Fixed the docs here: Netflix/dgs@a518e6d

from dgs-codegen.

deweyjose avatar deweyjose commented on July 21, 2024

@srinivasankavitha

Usually schema files are added under src/main/resources for graphql projects and hence we scan for the META-INF folder in codegen. Thanks for pointing out the documentation gap, we need to fix that.

Even though the graphqls files are typically under src/main/resources they do not necessarily get packaged in the jar under META-INF. This requirement seems odd to me. All of the .graphql files in the jars I produce are packaged outside of META-INF.

Even Apollo's Federation graphqls files are not packaged under META-INF.

image

Why does the code need to enforce the META-INF prefix vs scanning the entire Jar?

from dgs-codegen.

deweyjose avatar deweyjose commented on July 21, 2024

It looks like DGS decided to package error related schema in graphql-error-types under src/main/resources/META-INF/schema which is why it's packaged that way, but not all teams want to structure their codebases this way.
image

from dgs-codegen.

deweyjose avatar deweyjose commented on July 21, 2024

@srinivasankavitha thanks for taking a second look and reconsidering!

from dgs-codegen.

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.