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 InputType and OutputType attributes #2879

Merged
merged 1 commit into from
Jan 24, 2022
Merged

Add InputType and OutputType attributes #2879

merged 1 commit into from
Jan 24, 2022

Conversation

Shane32
Copy link
Member

@Shane32 Shane32 commented Jan 23, 2022

Separates InputType and OutputType which are used for type mappings from the GraphQLMetadata attribute which is used for configuring an automatically-constructed graph type.

The old properties remain as obsolete members.

@Shane32 Shane32 requested a review from sungam3r January 23, 2022 23:01
@Shane32 Shane32 self-assigned this Jan 23, 2022
@github-actions github-actions bot added test Pull request that adds new or changes existing tests documentation An issue or pull request regarding documentation improvements labels Jan 23, 2022
@sungam3r
Copy link
Member

Will review tomorrow.

@Shane32
Copy link
Member Author

Shane32 commented Jan 24, 2022

@sungam3r If you’re wondering why these changes are required, please view the draft #2880 to see how I plan to use attributes in v5.

(I do think the changes in this PR make sense regardless however.)

@@ -409,6 +417,12 @@ namespace GraphQL
public static T ToObject<T>(this System.Collections.Generic.IDictionary<string, object?> source)
where T : class { }
}
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.All)]
Copy link
Member

Choose a reason for hiding this comment

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

| System.AttributeTargets.All

Strange. The same with other attributes. I can not reproduce this output on my Windows machine.

@codecov-commenter
Copy link

Codecov Report

Merging #2879 (b2ed8f7) into master (46003b7) will decrease coverage by 0.01%.
The diff coverage is 79.48%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2879      +/-   ##
==========================================
- Coverage   83.78%   83.77%   -0.02%     
==========================================
  Files         364      366       +2     
  Lines       14979    15017      +38     
  Branches     2369     2377       +8     
==========================================
+ Hits        12550    12580      +30     
- Misses       1798     1802       +4     
- Partials      631      635       +4     
Impacted Files Coverage Δ
src/GraphQL/GraphQLMetadataAttribute.cs 78.94% <ø> (ø)
src/GraphQL/InputTypeAttribute.cs 69.23% <69.23%> (ø)
src/GraphQL/OutputTypeAttribute.cs 69.23% <69.23%> (ø)
src/GraphQL/Execution/DocumentExecuter.cs 89.90% <100.00%> (ø)
src/GraphQL/TypeExtensions.cs 86.95% <100.00%> (+0.91%) ⬆️

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 9f8d938...b2ed8f7. Read the comment docs.

@Shane32 Shane32 merged commit b1b249d into master Jan 24, 2022
@Shane32 Shane32 deleted the add_inputtype branch January 24, 2022 14:39
@sungam3r sungam3r added the new API New non breaking public APIs added label Jan 24, 2022
@Shane32 Shane32 mentioned this pull request Nov 4, 2023
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation An issue or pull request regarding documentation improvements new API New non breaking public APIs added test Pull request that adds new or changes existing tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants