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

Likely copy/paste error found in HotChocolate.Types.UsePagingAttribute #4815

Closed
1 task done
treymack opened this issue Mar 4, 2022 · 1 comment · Fixed by #4816
Closed
1 task done

Likely copy/paste error found in HotChocolate.Types.UsePagingAttribute #4815

treymack opened this issue Mar 4, 2022 · 1 comment · Fixed by #4816
Labels
Area: Data Issue is related to filtering, sorting, pagination or projections 🐛 bug Something isn't working 🌶️ hot chocolate

Comments

@treymack
Copy link
Contributor

treymack commented Mar 4, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Just familiarizing myself with the codebase and ran across what's likely a copy / paste error, given there are default values for the mis-mapped fields in HotChocolate.Types.Pagination.PagingDefaults.

    /// <summary>
    /// Allow backward paging using <c>last</c> and <c>before</c>
    /// </summary>
    public bool AllowBackwardPagination
    {
        get => _allowBackwardPagination ?? PagingDefaults.AllowBackwardPagination;
        set => _allowBackwardPagination = value;
    }

    /// <summary>
    /// Defines if the paging middleware shall require the
    /// API consumer to specify paging boundaries.
    /// </summary>
    public bool RequirePagingBoundaries
    {
        get => _requirePagingBoundaries ?? PagingDefaults.AllowBackwardPagination;
        set => _requirePagingBoundaries = value;
    }

    /// <summary>
    /// Connection names are by default inferred from the field name to
    /// which they are bound to as opposed to the node type name.
    /// </summary>
    public bool InferConnectionNameFromField
    {
        get => _inferConnectionNameFromField ?? PagingDefaults.AllowBackwardPagination;
        set => _inferConnectionNameFromField = value;
    }

The 2nd and 3rd properties listed above are all mapped to the default for AllowBackwardPagination if no override is supplied.

Steps to reproduce

  1. Visit https://github.com/ChilliCream/hotchocolate/blob/c479c10343f22328f708dc4d8e80f98a76bbf518/src/HotChocolate/Core/src/Types.CursorPagination/Extensions/UsePagingAttribute.cs

Relevant log output

No response

Additional Context?

No response

Product

Hot Chocolate

Version

12 (HEAD of repo)

@treymack treymack added the 🐛 bug Something isn't working label Mar 4, 2022
@tobias-tengler tobias-tengler added Area: Data Issue is related to filtering, sorting, pagination or projections 🌶️ hot chocolate labels Mar 4, 2022
@tobias-tengler
Copy link
Collaborator

Thanks @treymack for reporting! Would you mind submitting a PR to address the issue?

treymack pushed a commit to treymack/hotchocolate that referenced this issue Mar 4, 2022
arif-hanif added a commit to arif-hanif/hotchocolate that referenced this issue Mar 12, 2022
* Update requirement of package (ChilliCream#4461)

* Fixed mutation convention with ID attribute (ChilliCream#4639)

* Updated BCP preview links

* Updated Banana Cake Pop V22 (ChilliCream#4644)

* Fixed mutation convention runtime type determination (ChilliCream#4645)

* Added banners for blog articles

* Handle if errors prop exsits even if we have an response exception (ChilliCream#3928)

Co-authored-by: Pascal Senn <senn.pasc@gmail.com>

* Hot Chocolate 12.5 Release Blog (ChilliCream#4570)

* Fixed Spelling

* Website Cleanup

* Cleanup tabs (Website)

* Fixed Website Layout

* Integrated Apollo Federation Support in Build (ChilliCream#4650)

* Added SkipIntrospectionFields option on MaxDepthAnalyzer (ChilliCream#4649)

* Fixed Website Build Issues

* Added Security Policy

* Update Security Policy

* Fixed mutation convention for ListType payload (ChilliCream#4653)

* Added CodeQL

* Removed JavaScript from CodeQL

* Use Build Scripts with CodeQL

* Reworked CodeQL Build

* Updated CodeQL to install the dotnet SDK

* Fixed CodeQL dotnet build command.

* Fixed Website Layout Bug

* Website: Added Material UI

* Fixed Website Layout Issues

* Added error limits to the document validation. (ChilliCream#4655)

* New Website Search

* Fixed Badges

* Website Launch Button

* Fixed typo in mutations documentation (ChilliCream#4656)

* Fixed problems with benchmarks and adds reference results (ChilliCream#4659)

* Add note for xml docs + custom naming convention (ChilliCream#4661)

* Fixed ApolloFederation Printer (ChilliCream#4663)

* Refined ID attribute to allow use of IDAttribute also without global ID policy (ChilliCream#4667)

* Update issue templates (ChilliCream#4671)

* Update feature_request.yml

* Update bug_report.yml

* Add note about field member to migration document (ChilliCream#4674)

* Added support for DateOnly and TimeOnly in MongoDB (ChilliCream#4654)

Co-authored-by: David De Smet <2607383+idaviddesmet@users.noreply.github.com>
Co-authored-by: Pascal Senn <senn.pasc@gmail.com>

* Reference Resolver Refinement (ChilliCream#4672)

* Fixed Reference Resolvers (ChilliCream#4678)

* Update "Get started" guide (ChilliCream#4451)

* Update MongoDB Connection Documentation (ChilliCream#4681)

* Reworked External Field Handling (ChilliCream#4684)

* Added Apollo Federation Code-First Example (ChilliCream#4687)

* Refined Federation Printer for Custom Schema Directives (ChilliCream#4691)

* Website: Fixed heading color

* Bump Stackexchange.Redis to 2.2.88 (ChilliCream#4693)

* Fixed deprecation in federation schema printer. (ChilliCream#4694)

* Added DataLoader Batching Diagnostics (ChilliCream#4695)

* Adds pure resolver for stitching (ChilliCream#4702)

* Fixing minor typo in mongodb documentation (ChilliCream#4699)

* Added Schema Source Generator (ChilliCream#4708)

* Fixed Snapshots

* Reintroduced PaginationAmount for legacy paging support (ChilliCream#4709)

* Fixed Breaking Change (ChilliCream#4710)

* Fixed Stitching Test

* Fixed concurrency issue with DataLoader (ChilliCream#4718)

* Added support for schema building directives when using schema-first. (ChilliCream#4723)

* Added Helpers for JSON types (ChilliCream#4725)

* Fixed issue were schema-first input runtime types were not correctly inferred. (ChilliCream#4727)

* Fix spelling error (ChilliCream#4729)

* Fixed grammar (ChilliCream#4730)

* Fixed warnings in automapper package (ChilliCream#4728)

* Fixed interface inference issue when using schema-first (ChilliCream#4731)

* Reworked Types Analyzer to auto-register DataLoader (ChilliCream#4732)

* Added Analyzer to Templates (ChilliCream#4733)

* Adds deprecation of input fields and arguments (ChilliCream#4630)

* Added StrawberryShake Code Generator Server (ChilliCream#4742)

* Updated Release Build

* Fixed StrawberryShake Visual Studio issues

* Fixed schema-first input enum binding. (ChilliCream#4750)

* Cleanup StrawberrShake Generator Test Projects (ChilliCream#4751)

* Rename root activity before operation is known (ChilliCream#4749)

* Fixed StrawberryShake MSBuild integration (ChilliCream#4762)

* Added fetch once DataLoader (ChilliCream#4767)

* Remove the need to declare scalars when doing schema stitching (ChilliCream#4769)

* Removed Stitching From Source Generator (ChilliCream#4770)

* Updated Release Build

* Reworked Publish

* Fixed Snapshots

* Fixed build error that published all dlls in the output folder.

* Reworked Source Generator Deployment

* Reworked how we build the code generation server

* Updated Sonar Build Restore

* Changed Build VM

* Exclude Source Generators from Sonar Build

* Fixed Sonar Issue in Mongo Package (ChilliCream#4776)

* Reworked code generation for better compatibility with classic .NET (ChilliCream#4768)

* Abstracted Transport Handling in Schema Stitching (ChilliCream#4777)

* Added support for subscription stitching (ChilliCream#4786)

* Updated BCP to Version 1p23 (ChilliCream#4787)

* Fixed Compile Error

* @defer support for StrawberryShake (ChilliCream#4753)

* Update Neo4JDataRequestBuilderExtensions.cs (ChilliCream#4807)

* Updated BCP to Preview 25

* Use Default Values in UsePagingAttribute (ChilliCream#4815) (ChilliCream#4816)

* Added graphql-ws support (ChilliCream#4793)

* Updated BCP to Preview 26

* GraphQL over WebSocke fixes. (ChilliCream#4819)

* Add default arguments to IEndpointRouteBuilder Map methods (ChilliCream#4792)

* Add default arguments to Map methods

* Add ArgumentNullExceptions

Co-authored-by: Michael Staib <michael@chillicream.com>

* Document dependency injection / Entity Framework Core (ChilliCream#4817)

* Fixed Typos. (ChilliCream#4830)

* Error message grammar (ChilliCream#4829)

Co-authored-by: Michael Staib <michael@chillicream.com>

* Added a utility to communicate with graphql-ws (ChilliCream#4820)

* Add support for custom NodaTime patterns for serialization and deserialization (ChilliCream#4801)

* Reorganized Transport Tests (ChilliCream#4834)

* Fix Website Release Pipeline (ChilliCream#4836)

Co-authored-by: Jari Pennanen <ciantic@oksidi.com>
Co-authored-by: PascalSenn <senn.pasc@gmail.com>
Co-authored-by: Rafael Staib <rafael@chillicream.com>
Co-authored-by: Michael Staib <michael@chillicream.com>
Co-authored-by: Kim Svensson <61824112+allmightyse@users.noreply.github.com>
Co-authored-by: Aleksey Bogomolov <horse315@gmail.com>
Co-authored-by: Daniel Granerud <86605963+nullableexception@users.noreply.github.com>
Co-authored-by: martetassyns <78635303+martetassyns@users.noreply.github.com>
Co-authored-by: Ben McCallum <ben.mccallum@live.com.au>
Co-authored-by: David De Smet <2607383+daviddesmet@users.noreply.github.com>
Co-authored-by: David De Smet <2607383+idaviddesmet@users.noreply.github.com>
Co-authored-by: Tobias Tengler <45513122+tobias-tengler@users.noreply.github.com>
Co-authored-by: itmuckel <michael.bachner@outlook.de>
Co-authored-by: stxwright <14978758+stxwright@users.noreply.github.com>
Co-authored-by: Mikkel Hansen <92272397+mhnisportal@users.noreply.github.com>
Co-authored-by: Gabriel Lucaci <gabriel.lucaci.dev@gmail.com>
Co-authored-by: avisra <chris@avisra.com>
Co-authored-by: Trey Mack <tmack10@gmail.com>
Co-authored-by: grounzero <16921017+grounzero@users.noreply.github.com>
Co-authored-by: David Driscoll <david.driscoll@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Data Issue is related to filtering, sorting, pagination or projections 🐛 bug Something isn't working 🌶️ hot chocolate
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants