marmelab / marmelab/json-graphql-server

Why not Input Types?

Open
#84 4 comments 7 reactions 0 assignees View on GitHub
BC Enhancement
Dominant language
JavaScript
Stars
1.9k
Forks
166
Avg merge
3m
Merged PRs (30d)
3

Description

I need to understand why using the `db.js` example file from Readme it doesn't generate the `input PostInput` or `input UserInput` or `input CommentInput`.

Example:

I think it is better to use something like this:

`createPost(id: ID!, input: PostInput!): Post`

instead of what is now generated:

`createPost(id: ID!, title: String!, views: Int!, user_id: ID!): Post`.

Am I wrong? I'm still learning... I'm asking for hints. Thanks.

Contributor guide

Open the contributing guide

Research direction

Start with the README's db.js example and inspect how the generated createPost, PostInput, UserInput, and CommentInput schema entries are produced. Determine whether input object types are intended to be supported and document the expected schema or the decision about changing it; the issue does not name a test or implementation entry point.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, javascript
Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.