Skip to content

someEndpointsHaveNoGraphQLRepresentationAndMeDontLikeThat - Support for maps in the endpoints #1

@adamisntdead

Description

@adamisntdead

Hey!

Just playing around with this today, and I was really just looking at the schemas being generated until I came across this gem:

type ruleGroups {
    thisTypeHasNoFieldsAndGraphQLDontLikeThat: Boolean
}

I'm going to have to be honest and say I don't really think that's gonna work, funny as it may be:

Can I make two suggestions on how to deal with this?

First, those types usually are just objects with keys, something like this in JSON:

(key): {
  ...
}

My suggestion would be turn that into a type like:

type {
  key: 'blahblah'
  ...
}

If that wouldn't work, I would change the initial type to something like:

type ruleGroups {
    thisTypeHasNoFieldsAndGraphQLDontLikeThat: Boolean
    json: String
}

And just do a JSON.stringify(...) and dump it in that json field

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions