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

Add Support to Inline Fragments #194

Merged

Conversation

DimuthuMadushan
Copy link
Contributor

Purpose

Fixes: #1244

Examples

Following query is valid:

query {
    ... on Query {
        profile {
            name
        }
    }
}

on the following service:

import ballerina/graphql;

service graphql:Service on new graphql:Listener(9090) {
    resource function get profile returns Person {
        return { name: "John Doe", age: 20 };
    }
}

type Person record {
    string name;
    int age;
};

Checklist

  • Linked to an issue
  • Updated the changelog
  • Added tests

@codecov
Copy link

codecov bot commented May 5, 2021

Codecov Report

Merging #194 (5f2b632) into master (0773c77) will increase coverage by 0.33%.
The diff coverage is 85.10%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #194      +/-   ##
============================================
+ Coverage     89.48%   89.81%   +0.33%     
  Complexity      196      196              
============================================
  Files            41       41              
  Lines          1654     1689      +35     
  Branches        665      689      +24     
============================================
+ Hits           1480     1517      +37     
+ Misses          158      156       -2     
  Partials         16       16              
Impacted Files Coverage Δ Complexity Δ
graphql-ballerina/modules/parser/document_node.bal 76.47% <64.70%> (+8.28%) 0.00 <0.00> (ø)
graphql-ballerina/modules/parser/parser.bal 92.26% <96.42%> (+0.39%) 0.00 <0.00> (ø)
graphql-ballerina/modules/parser/fragment_node.bal 92.00% <100.00%> (+5.04%) 0.00 <0.00> (ø)
graphql-ballerina/validator_visitor.bal 91.17% <0.00%> (+1.47%) 0.00% <0.00%> (ø%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0773c77...5f2b632. Read the comment docs.

changelog.md Outdated Show resolved Hide resolved
graphql-ballerina/modules/parser/document_node.bal Outdated Show resolved Hide resolved
graphql-ballerina/modules/parser/fragment_node.bal Outdated Show resolved Hide resolved
graphql-ballerina/modules/parser/parser.bal Outdated Show resolved Hide resolved
graphql-ballerina/modules/parser/parser.bal Outdated Show resolved Hide resolved
graphql-ballerina/tests/14_fragments.bal Outdated Show resolved Hide resolved
graphql-ballerina/tests/14_fragments.bal Outdated Show resolved Hide resolved
graphql-ballerina/tests/14_fragments.bal Outdated Show resolved Hide resolved
graphql-ballerina/tests/14_fragments.bal Outdated Show resolved Hide resolved
DimuthuMadushan and others added 4 commits May 6, 2021 16:36
Co-authored-by: Thisaru Guruge <thisaru@wso2.com>
Co-authored-by: Thisaru Guruge <thisaru@wso2.com>
@@ -133,3 +133,4 @@ isolated function testEnumWithUnion() returns error? {
};
test:assertEquals(actualPayload, expectedPayload);
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now there are two empty lines?

@ThisaruGuruge ThisaruGuruge merged commit a43918c into ballerina-platform:master May 6, 2021
@DimuthuMadushan DimuthuMadushan deleted the add-inline-fragments branch September 30, 2021 04:22
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

Successfully merging this pull request may close these issues.

Inline Fragment Support for Ballerina GraphQL
2 participants