Coder Social home page Coder Social logo

Comments (5)

danielkcz avatar danielkcz commented on May 26, 2024 1

@dotansimha So what about the typesPrefix? Do you have some answer to that, please? The issue got closed accidentally with the PR.

from graphql-code-generator-community.

ganonbit avatar ganonbit commented on May 26, 2024 1

same issue with the plugin typescript-msw, it doesnt respect/acknolwedge omitOperationSuffix, even though the class its extending from class MSWVisitor extends visitorPluginCommon.ClientSideBaseVisitor has it listed as a config option. Was able to add it back manually but thats going to be a pain to manage a "custom" plugin that is fixed

from graphql-code-generator-community.

danielkcz avatar danielkcz commented on May 26, 2024

So I decided to have a stab at this since it's starting to annoy me.

First thing, I noticed there is an explicit test to ignore typesPrefix. Why is that? Is that some opinion that it "looks ugly"? That certainly shouldn't be like that. If configured, it should be respected no matter what.

https://github.com/dotansimha/graphql-code-generator/blob/1ddabd70d424653f1e9b01819ede255b2cd0c53b/packages/plugins/typescript/urql/tests/urql.spec.ts#L591-L603

Same for components...

https://github.com/dotansimha/graphql-code-generator/blob/1ddabd70d424653f1e9b01819ede255b2cd0c53b/packages/plugins/typescript/urql/tests/urql.spec.ts#L455-L467

So what is the stance here? Changing this here is technically a breaking change if someone uses typesPrefix for something else.

from graphql-code-generator-community.

dotansimha avatar dotansimha commented on May 26, 2024

Thanks, @FredyC , let's keep this open until we'll have a complete solution.

from graphql-code-generator-community.

danielkcz avatar danielkcz commented on May 26, 2024

@dotansimha Solution is simple, but I need someone to decide what is the "correct behavior". Apparently, it was intended to ignore typesPrefix for some reason.

from graphql-code-generator-community.

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.