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

Make GraphQL service work with GraphQL Playground #1279

Closed
shafreenAnfar opened this issue Apr 21, 2021 · 1 comment · Fixed by ballerina-platform/module-ballerina-graphql#201
Assignees
Labels
module/graphql Issues related to Ballerina GraphQL module Priority/High Team/PCM Protocol connector packages related issues Type/Improvement

Comments

@shafreenAnfar
Copy link
Contributor

shafreenAnfar commented Apr 21, 2021

GraphQL Playground is a popular tool for working with GraphQL services.

Screen Shot 2021-04-21 at 11 02 05 AM

This tool can be used to interact with Ballerina GraphQL services. But following things do not work.

  1. Client side query validation and suggestions
  2. Schema is not retrieved
  3. Documentation is not retrieved

We need to start working on supporting each in order.

@shafreenAnfar shafreenAnfar added Priority/High Type/Improvement module/graphql Issues related to Ballerina GraphQL module Team/PCM Protocol connector packages related issues labels Apr 21, 2021
@shafreenAnfar
Copy link
Contributor Author

shafreenAnfar commented Apr 21, 2021

It seems the first point is failing because GraphQL service could not handle the below introspection query.

query IntrospectionQuery {
    __schema {
        queryType {
            name
        }
        mutationType {
            name
        }
        subscriptionType {
            name
        }
        types {
            ...FullType
        }
        directives {
            name
            description
            locations
            args {
                ...InputValue
            }
        }
    }
}
        
fragment FullType on __Type {
    kind
    name
    description
    fields(includeDeprecated: true) {
        name
        description
        args {
            ...InputValue
        }
        type {
            ...TypeRef
        }
        isDeprecated
        deprecationReason
    }
    inputFields {
        ...InputValue
    }
    interfaces {
        ...TypeRef
    }
    enumValues(includeDeprecated: true) {
        name
        description
        isDeprecated
        deprecationReason
    }
    possibleTypes {
        ...TypeRef
    }
}
        
fragment InputValue on __InputValue {
    name
    description
    type {
        ...TypeRef
    }
    defaultValue
}
        
fragment TypeRef on __Type {
    kind
    name
    ofType {
        kind
        name
        ofType {
            kind
            name
            ofType {
                kind
                name
                ofType {
                    kind
                    name
                    ofType {
                        kind
                        name
                        ofType {
                            kind
                            name
                            ofType {
                                kind
                                name
                            }
                        }
                    }
                }
            }
        }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/graphql Issues related to Ballerina GraphQL module Priority/High Team/PCM Protocol connector packages related issues Type/Improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants