Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to define nested values when using InputObjectType??? #1120

Open
rwc0920 opened this issue Jul 21, 2022 · 0 comments
Open

Is there a way to define nested values when using InputObjectType??? #1120

rwc0920 opened this issue Jul 21, 2022 · 0 comments

Comments

@rwc0920
Copy link

rwc0920 commented Jul 21, 2022

mockObj = {
  name: "John",
  cars: { van: "", truck: "" }
}

const InitialQuestions = inputObjectType({
  name: 'InitialQuestions',
  definition: (t) => {
    t.string('name')
    ** DEFINE CARS PROPERTY HERE **
  }
})

export const submit = extendType({
  type: 'Mutation',
  definition: t => {
    t.field('InitialQuestions', {
      type: FormSubmit ,
      args: {form: InitialQuestions},
      resolve: applicationInitialQuestions
    })
  }
})

Im trying to define some values that are nested when using inputObjectTypes. Does anybody know if this is doable? I've done a lot of googling but haven't really found many examples in this context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant