Skip to content

Locally run graphiql with custom schema #259

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

Closed
sudheerj opened this issue Dec 23, 2016 · 5 comments
Closed

Locally run graphiql with custom schema #259

sudheerj opened this issue Dec 23, 2016 · 5 comments
Labels

Comments

@sudheerj
Copy link

As per POC on Graphql language I'm trying to test various types of queries in POSTMAN.But I didn't find the way to add below dynamic queries in POSTMAN.If it is not supported by POSTMAN then how can we build local graphiql with our own schema.

Example,

query GetAccounts($filter: AccountsFilter) {
accounts(filter: $filter) {
account_name
}
}
{
"filter": {
"region": "APAC",
"code": {"in": [ "HK1", "SG1" ]},
"account_number": {"nin": [ "1" ]}
}
}

@asiandrummer
Copy link
Contributor

I'm not sure what POSTMAN is - is that a name of the GraphQL Schema you've created?

Just for your information, for supplying your own GraphQLSchema, you can either pass an already-created GraphQLSchema object or pass a fetcher function to perform an introspection query. This is explained in README, but you may gather a few more helpful references if you look at our example code that mounts GraphiQL component, along with the example server code.

@sudheerj
Copy link
Author

sudheerj commented Dec 28, 2016

POSTMAN is a GUI platform to make complex HTTP requests for API workflow.

I enabled graphIql: true parameter in the server code.So I can query through GraphIql editor easily.

@asiandrummer
Copy link
Contributor

I'm sorry, but I have zero knowledge about POSTMAN, and it's much difficult to help you without knowing how POSTMAN operates and how you've hooked it up with GraphiQL. Does your server have GraphQL schema? Did those example codes help you at all?

@sudheerj
Copy link
Author

sudheerj commented Dec 28, 2016

Even it didn't workout with GraphiQL.I just need how to pass JSON parameter as String from GraphiQL IDE.Those examples won't explain me on how to pass JSON string values.

I just need on how to pass below JSON in the form of String.

{
"filter": {
"region": "APAC",
"code": {"in": [ "HK1", "SG1" ]},
"account_number": {"nin": [ "1" ]}
}
}

@asiandrummer
Copy link
Contributor

I think this is then a similar question to #262 - closing this one in favor of that one. Feel free to reopen if you feel otherwise.

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

No branches or pull requests

2 participants