Coder Social home page Coder Social logo

Comments (8)

ardatan avatar ardatan commented on May 26, 2024 2

Feel free to contribute with a PR :) We'd love to support.

from graphql-code-generator-community.

iscekic avatar iscekic commented on May 26, 2024 1

+1 this would be very nice to have, especially for large sdks shared between client and server.

I'm guessing the api would need to look something like this from a consumer's point of view:

import { getItems } from '~/generated/sdk';
import { client } from '~/client';

// variables and other params omitted
const result = await getItems(client);

from graphql-code-generator-community.

cipriancaba avatar cipriancaba commented on May 26, 2024 1

@ardatan created the PR for the change. Happy to discuss any specifics

from graphql-code-generator-community.

dotansimha avatar dotansimha commented on May 26, 2024

@ardatan do you think we can apply some magic here? :D or it requires a whole change in the plugin output?

from graphql-code-generator-community.

ardatan avatar ardatan commented on May 26, 2024

@dotansimha Maybe we can export functions instead of an object factory and set the stuff as global variables but not sure if this is ideal?
Or we can use class instead of object factory.

from graphql-code-generator-community.

kaorun343 avatar kaorun343 commented on May 26, 2024

any updates?

from graphql-code-generator-community.

cipriancaba avatar cipriancaba commented on May 26, 2024

This is causing a huge initial impact on the loading of our app too. It would be really nice to be able to import functions as opposed to a huge object

from graphql-code-generator-community.

kaorun343 avatar kaorun343 commented on May 26, 2024

I also need this new feature for typescript-generic-sdk !

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.