Git Product home page Git Product logo

Comments (8)

shawnjones253 avatar shawnjones253 commented on June 11, 2024 1

@MichalLytek i believe this may be due to changing the generator's target to es2022 here

i've been playing around locally, and changing that one line creates these two different class definitions in the emitted js:

es2019

let FindManyUserArgs = class FindManyUserArgs {
};

es2022

let FindManyUserArgs = class FindManyUserArgs {
    where;
    orderBy;
    cursor;
    take;
    skip;
    distinct;
};

If I understand correctly, before ES2022, classes had to define properties in the constructor, but since the generated classes in type-graphql don't have constructors, they don't get initialized just by creating an instance of the class (and therefore don't exist unless typegraphql core sets a value for them? guessing here)

from typegraphql-prisma.

MichalLytek avatar MichalLytek commented on June 11, 2024

I don't see anything that could affect that:
image

What is your type-graphql version?

from typegraphql-prisma.

shawnjones253 avatar shawnjones253 commented on June 11, 2024

@MichalLytek here's the package.json with all the versions used in my repro

"type-graphql": "2.0.0-beta.4"

but i can also repro with 2.0.0-beta.3 and 2.0.0-beta.2

from typegraphql-prisma.

shawnjones253 avatar shawnjones253 commented on June 11, 2024

@MichalLytek it does seem the test snapshots were updated to expect all these undefined values in this commit

from typegraphql-prisma.

MichalLytek avatar MichalLytek commented on June 11, 2024

but i can also repro with 2.0.0-beta.3 and 2.0.0-beta.2

So this is related to type-graphql core itself. Will check it.

from typegraphql-prisma.

shawnjones253 avatar shawnjones253 commented on June 11, 2024

@MichalLytek #435

from typegraphql-prisma.

MichalLytek avatar MichalLytek commented on June 11, 2024

Closing as fixed by 4c053cc

from typegraphql-prisma.

mmmeff avatar mmmeff commented on June 11, 2024

Thank you @MichalLytek ! Much appreciated.

from typegraphql-prisma.

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.