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

Fix Validating any and anydata Returning from Resources #329

Merged
merged 2 commits into from
Jul 8, 2021

Conversation

ThisaruGuruge
Copy link
Member

Purpose

Since GraphQL types are nominal, returning any or anydata from a resource does not mean anything. With this PR, the compiler plugin will throw an error when any or anydata is returned from a resource function.

Fixes: #1622

Examples

N/A

Checklist

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

@ThisaruGuruge ThisaruGuruge force-pushed the invalidate-any-type branch from 8066b23 to 7544a05 Compare July 8, 2021 12:37
@codecov
Copy link

codecov bot commented Jul 8, 2021

Codecov Report

Merging #329 (8066b23) into master (8f69d9f) will not change coverage.
The diff coverage is n/a.

❗ Current head 8066b23 differs from pull request most recent head bc96e79. Consider uploading reports for the commit bc96e79 to get more accurate results
Impacted file tree graph

@@            Coverage Diff            @@
##             master     #329   +/-   ##
=========================================
  Coverage     93.64%   93.64%           
  Complexity      229      229           
=========================================
  Files            47       47           
  Lines          2125     2125           
  Branches        938      938           
=========================================
  Hits           1990     1990           
  Misses          121      121           
  Partials         14       14           

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 8f69d9f...bc96e79. Read the comment docs.

Copy link
Contributor

@aashikam aashikam left a comment

Choose a reason for hiding this comment

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

LGTM

changelog.md Outdated Show resolved Hide resolved
Co-authored-by: Arshika Mohottige <arshika.nm@gmail.com>
@ThisaruGuruge ThisaruGuruge merged commit 321235a into master Jul 8, 2021
@ThisaruGuruge ThisaruGuruge deleted the invalidate-any-type branch July 8, 2021 15:13
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.

GraphQL Compiler Plugin Allows Resource Functions to Return 'any' Type
2 participants