Giter Site home page Giter Site logo

nexus-plugins's Introduction

๐Ÿ—จ My name is Jonathan Cardoso, I'm a Full-Stack Developer since 2011, currently living in Curitiba, PR - Brazil and working remotely at Teamflow, helping shape the future of remote work.

๐Ÿ‘จโ€๐Ÿ’ป My favorites languages, tech and libraries are: TypeScript, Node.js, GraphQL, TypeScript, React and did I say that I love TypeScript?

โš™ If given the opportunity, I seek to be [one of] the DevOps person - I have experience with most CI platforms, deployments tools, and cloud providers - Currently using Terraform and Kubernetes on GCP.

๐Ÿ“š Learning Elixir and game development using the Unity Editor - Loving both โค - Planning to learn Rust at some point in 2021

๐Ÿ•น Playing video games since I was kid, favorites genres are: (J)RPGs, Turn-Based, Survival, Sci-fi and Roguelike

โœ Blog

๐Ÿคฉ Perfect job would be 60% Backend, 25% DevOps, and 15% Frontend

๐ŸŒ You can also find me on:

๐Ÿ™‹โ€โ™‚๏ธ Pronouns: He/Him

Buy Me A Coffee
Patreon Logo
Discord Logo

โšก Fun Fact: I've a Bachelor's Degree in Accounting, but I never worked as an Accountant.

๐ŸŽถ ๐ŸŽถ ๐ŸŽถ

Contributions on GitLab in the last year

nexus-plugins's People

Contributors

bastiankistner avatar dependabot[bot] avatar jcmais avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

bastiankistner

nexus-plugins's Issues

Generated type mismatch

Since updating to @jcm/nexus-plugin-relay-mutation 0.1.2, TypeScript types generated by Nexus do not align with the actual input argument passed to mutateAndGetPayload.

For example, if I created a Relay mutation as follows

  t.relayMutation('foo', {
    inputFields(it) {
      it.nonNull.string('bar');
    },
    outputFields(ot) {
      ot.nonNull.string('baz');
    },
    mutateAndGetPayload(_root, inputFields) {
      return {baz: inputFields.bar};
    },
  });

TypeScript will expect the type of inputFields to be

inputFields: {
  input: {
    baz: string;
    clientMutationId?: string | null | undefined;
  };
}

meanwhile the actual type is

inputFields: {
  baz: string;
  clientMutationId?: string | null | undefined;
}

Field "id" missing in typescript definition when using plugin

When I use the plugin and define id as a relayGlobalId field, it results in a type error stating that "id" is not found on the object. If I use the model ID instead of relay (uncomment line below), there is no type error, but the id is obviously not relay-compliant. I'm not sure if this is related to graphql-nexus/nexus#36 (see comment), but is there any way to get nexus to realize the id does exist on the root type?

const Task = objectType({
  name: TaskModel.$name,
  definition: (t) => {
    t.implements('Node')
    t.relayGlobalId('id', {})
    // t.field(TaskModel.id.name, TaskModel.id)
    t.connectionField('comments', {
      type: 'Comment',
      resolve: async (src, args, ctx, info) => {
        const comments = db.comment.find({
          where: {
            taskId: src.id, // <==== TypeError Here
          },
        })
      },
    })
  },
})

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.