datacite/lupo

View on GitHub
app/graphql/types/query_type.rb

Summary

Maintainability
F
2 wks
Test Coverage

File query_type.rb has 1225 lines of code (exceeds 250 allowed). Consider refactoring.
Open

class QueryType < BaseObject
  extend_type

  field :members, MemberConnectionWithTotalType, null: false do
    argument :query, String, required: false
Severity: Major
Found in app/graphql/types/query_type.rb - About 3 days to fix

    Class QueryType has 71 methods (exceeds 20 allowed). Consider refactoring.
    Open

    class QueryType < BaseObject
      extend_type
    
      field :members, MemberConnectionWithTotalType, null: false do
        argument :query, String, required: false
    Severity: Major
    Found in app/graphql/types/query_type.rb - About 1 day to fix

      Method response has 34 lines of code (exceeds 25 allowed). Consider refactoring.
      Wontfix

        def response(**args)
          Doi.gql_query(
            args[:query],
            ids: args[:ids],
            user_id: args[:user_id],
      Severity: Minor
      Found in app/graphql/types/query_type.rb - About 1 hr to fix

        Method actors has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

          def actors(**args)
            orgs = Organization.query(args[:query], offset: args[:after].present? ? Base64.urlsafe_decode64(args[:after]) : nil)
            funders = Funder.query(args[:query], limit: args[:first], offset: args[:after].present? ? Base64.urlsafe_decode64(args[:after]) : nil)
            people = Person.query(args[:query], limit: args[:first], offset: args[:after].present? ? Base64.urlsafe_decode64(args[:after]) : nil)
        
        
        Severity: Minor
        Found in app/graphql/types/query_type.rb - About 25 mins to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

        Similar blocks of code found in 22 locations. Consider refactoring.
        Open

          field :publications, PublicationConnectionWithTotalType, null: false do
            argument :query, String, required: false
            argument :ids, [String], required: false
            argument :published, String, required: false
            argument :user_id, String, required: false
        Severity: Major
        Found in app/graphql/types/query_type.rb and 21 other locations - About 5 hrs to fix
        app/graphql/types/query_type.rb on lines 299..326
        app/graphql/types/query_type.rb on lines 383..410
        app/graphql/types/query_type.rb on lines 425..452
        app/graphql/types/query_type.rb on lines 467..494
        app/graphql/types/query_type.rb on lines 549..576
        app/graphql/types/query_type.rb on lines 591..618
        app/graphql/types/query_type.rb on lines 633..660
        app/graphql/types/query_type.rb on lines 675..702
        app/graphql/types/query_type.rb on lines 760..787
        app/graphql/types/query_type.rb on lines 802..829
        app/graphql/types/query_type.rb on lines 844..871
        app/graphql/types/query_type.rb on lines 886..913
        app/graphql/types/query_type.rb on lines 929..956
        app/graphql/types/query_type.rb on lines 972..999
        app/graphql/types/query_type.rb on lines 1015..1042
        app/graphql/types/query_type.rb on lines 1058..1085
        app/graphql/types/query_type.rb on lines 1101..1128
        app/graphql/types/query_type.rb on lines 1144..1171
        app/graphql/types/query_type.rb on lines 1187..1214
        app/graphql/types/query_type.rb on lines 1230..1257
        app/graphql/types/query_type.rb on lines 1273..1300

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 169.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 22 locations. Consider refactoring.
        Open

          field :dissertations, DissertationConnectionWithTotalType, null: false do
            argument :query, String, required: false
            argument :ids, [String], required: false
            argument :published, String, required: false
            argument :user_id, String, required: false
        Severity: Major
        Found in app/graphql/types/query_type.rb and 21 other locations - About 5 hrs to fix
        app/graphql/types/query_type.rb on lines 299..326
        app/graphql/types/query_type.rb on lines 341..368
        app/graphql/types/query_type.rb on lines 383..410
        app/graphql/types/query_type.rb on lines 425..452
        app/graphql/types/query_type.rb on lines 467..494
        app/graphql/types/query_type.rb on lines 549..576
        app/graphql/types/query_type.rb on lines 591..618
        app/graphql/types/query_type.rb on lines 633..660
        app/graphql/types/query_type.rb on lines 675..702
        app/graphql/types/query_type.rb on lines 760..787
        app/graphql/types/query_type.rb on lines 802..829
        app/graphql/types/query_type.rb on lines 844..871
        app/graphql/types/query_type.rb on lines 929..956
        app/graphql/types/query_type.rb on lines 972..999
        app/graphql/types/query_type.rb on lines 1015..1042
        app/graphql/types/query_type.rb on lines 1058..1085
        app/graphql/types/query_type.rb on lines 1101..1128
        app/graphql/types/query_type.rb on lines 1144..1171
        app/graphql/types/query_type.rb on lines 1187..1214
        app/graphql/types/query_type.rb on lines 1230..1257
        app/graphql/types/query_type.rb on lines 1273..1300

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 169.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 22 locations. Consider refactoring.
        Open

          field :datasets, DatasetConnectionWithTotalType, null: false do
            argument :query, String, required: false
            argument :ids, [String], required: false
            argument :published, String, required: false
            argument :user_id, String, required: false
        Severity: Major
        Found in app/graphql/types/query_type.rb and 21 other locations - About 5 hrs to fix
        app/graphql/types/query_type.rb on lines 341..368
        app/graphql/types/query_type.rb on lines 383..410
        app/graphql/types/query_type.rb on lines 425..452
        app/graphql/types/query_type.rb on lines 467..494
        app/graphql/types/query_type.rb on lines 549..576
        app/graphql/types/query_type.rb on lines 591..618
        app/graphql/types/query_type.rb on lines 633..660
        app/graphql/types/query_type.rb on lines 675..702
        app/graphql/types/query_type.rb on lines 760..787
        app/graphql/types/query_type.rb on lines 802..829
        app/graphql/types/query_type.rb on lines 844..871
        app/graphql/types/query_type.rb on lines 886..913
        app/graphql/types/query_type.rb on lines 929..956
        app/graphql/types/query_type.rb on lines 972..999
        app/graphql/types/query_type.rb on lines 1015..1042
        app/graphql/types/query_type.rb on lines 1058..1085
        app/graphql/types/query_type.rb on lines 1101..1128
        app/graphql/types/query_type.rb on lines 1144..1171
        app/graphql/types/query_type.rb on lines 1187..1214
        app/graphql/types/query_type.rb on lines 1230..1257
        app/graphql/types/query_type.rb on lines 1273..1300

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 169.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 22 locations. Consider refactoring.
        Open

          field :audiovisuals, AudiovisualConnectionWithTotalType, null: false do
            argument :query, String, required: false
            argument :ids, [String], required: false
            argument :published, String, required: false
            argument :user_id, String, required: false
        Severity: Major
        Found in app/graphql/types/query_type.rb and 21 other locations - About 5 hrs to fix
        app/graphql/types/query_type.rb on lines 299..326
        app/graphql/types/query_type.rb on lines 341..368
        app/graphql/types/query_type.rb on lines 425..452
        app/graphql/types/query_type.rb on lines 467..494
        app/graphql/types/query_type.rb on lines 549..576
        app/graphql/types/query_type.rb on lines 591..618
        app/graphql/types/query_type.rb on lines 633..660
        app/graphql/types/query_type.rb on lines 675..702
        app/graphql/types/query_type.rb on lines 760..787
        app/graphql/types/query_type.rb on lines 802..829
        app/graphql/types/query_type.rb on lines 844..871
        app/graphql/types/query_type.rb on lines 886..913
        app/graphql/types/query_type.rb on lines 929..956
        app/graphql/types/query_type.rb on lines 972..999
        app/graphql/types/query_type.rb on lines 1015..1042
        app/graphql/types/query_type.rb on lines 1058..1085
        app/graphql/types/query_type.rb on lines 1101..1128
        app/graphql/types/query_type.rb on lines 1144..1171
        app/graphql/types/query_type.rb on lines 1187..1214
        app/graphql/types/query_type.rb on lines 1230..1257
        app/graphql/types/query_type.rb on lines 1273..1300

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 169.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 22 locations. Consider refactoring.
        Open

          field :interactive_resources, InteractiveResourceConnectionWithTotalType, null: false do
            argument :query, String, required: false
            argument :ids, [String], required: false
            argument :published, String, required: false
            argument :user_id, String, required: false
        Severity: Major
        Found in app/graphql/types/query_type.rb and 21 other locations - About 5 hrs to fix
        app/graphql/types/query_type.rb on lines 299..326
        app/graphql/types/query_type.rb on lines 341..368
        app/graphql/types/query_type.rb on lines 383..410
        app/graphql/types/query_type.rb on lines 425..452
        app/graphql/types/query_type.rb on lines 467..494
        app/graphql/types/query_type.rb on lines 549..576
        app/graphql/types/query_type.rb on lines 633..660
        app/graphql/types/query_type.rb on lines 675..702
        app/graphql/types/query_type.rb on lines 760..787
        app/graphql/types/query_type.rb on lines 802..829
        app/graphql/types/query_type.rb on lines 844..871
        app/graphql/types/query_type.rb on lines 886..913
        app/graphql/types/query_type.rb on lines 929..956
        app/graphql/types/query_type.rb on lines 972..999
        app/graphql/types/query_type.rb on lines 1015..1042
        app/graphql/types/query_type.rb on lines 1058..1085
        app/graphql/types/query_type.rb on lines 1101..1128
        app/graphql/types/query_type.rb on lines 1144..1171
        app/graphql/types/query_type.rb on lines 1187..1214
        app/graphql/types/query_type.rb on lines 1230..1257
        app/graphql/types/query_type.rb on lines 1273..1300

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 169.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 22 locations. Consider refactoring.
        Open

          field :journal_articles, JournalArticleConnectionWithTotalType, null: false do
            argument :query, String, required: false
            argument :ids, [String], required: false
            argument :published, String, required: false
            argument :user_id, String, required: false
        Severity: Major
        Found in app/graphql/types/query_type.rb and 21 other locations - About 5 hrs to fix
        app/graphql/types/query_type.rb on lines 299..326
        app/graphql/types/query_type.rb on lines 341..368
        app/graphql/types/query_type.rb on lines 383..410
        app/graphql/types/query_type.rb on lines 425..452
        app/graphql/types/query_type.rb on lines 467..494
        app/graphql/types/query_type.rb on lines 549..576
        app/graphql/types/query_type.rb on lines 591..618
        app/graphql/types/query_type.rb on lines 633..660
        app/graphql/types/query_type.rb on lines 675..702
        app/graphql/types/query_type.rb on lines 760..787
        app/graphql/types/query_type.rb on lines 802..829
        app/graphql/types/query_type.rb on lines 844..871
        app/graphql/types/query_type.rb on lines 886..913
        app/graphql/types/query_type.rb on lines 929..956
        app/graphql/types/query_type.rb on lines 972..999
        app/graphql/types/query_type.rb on lines 1015..1042
        app/graphql/types/query_type.rb on lines 1058..1085
        app/graphql/types/query_type.rb on lines 1101..1128
        app/graphql/types/query_type.rb on lines 1144..1171
        app/graphql/types/query_type.rb on lines 1230..1257
        app/graphql/types/query_type.rb on lines 1273..1300

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 169.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 22 locations. Consider refactoring.
        Open

          field :collections, CollectionConnectionWithTotalType, null: false do
            argument :query, String, required: false
            argument :ids, [String], required: false
            argument :published, String, required: false
            argument :user_id, String, required: false
        Severity: Major
        Found in app/graphql/types/query_type.rb and 21 other locations - About 5 hrs to fix
        app/graphql/types/query_type.rb on lines 299..326
        app/graphql/types/query_type.rb on lines 341..368
        app/graphql/types/query_type.rb on lines 383..410
        app/graphql/types/query_type.rb on lines 467..494
        app/graphql/types/query_type.rb on lines 549..576
        app/graphql/types/query_type.rb on lines 591..618
        app/graphql/types/query_type.rb on lines 633..660
        app/graphql/types/query_type.rb on lines 675..702
        app/graphql/types/query_type.rb on lines 760..787
        app/graphql/types/query_type.rb on lines 802..829
        app/graphql/types/query_type.rb on lines 844..871
        app/graphql/types/query_type.rb on lines 886..913
        app/graphql/types/query_type.rb on lines 929..956
        app/graphql/types/query_type.rb on lines 972..999
        app/graphql/types/query_type.rb on lines 1015..1042
        app/graphql/types/query_type.rb on lines 1058..1085
        app/graphql/types/query_type.rb on lines 1101..1128
        app/graphql/types/query_type.rb on lines 1144..1171
        app/graphql/types/query_type.rb on lines 1187..1214
        app/graphql/types/query_type.rb on lines 1230..1257
        app/graphql/types/query_type.rb on lines 1273..1300

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 169.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 22 locations. Consider refactoring.
        Open

          field :data_management_plans, DataManagementPlanConnectionWithTotalType, null: false do
            argument :query, String, required: false
            argument :ids, [String], required: false
            argument :published, String, required: false
            argument :user_id, String, required: false
        Severity: Major
        Found in app/graphql/types/query_type.rb and 21 other locations - About 5 hrs to fix
        app/graphql/types/query_type.rb on lines 299..326
        app/graphql/types/query_type.rb on lines 341..368
        app/graphql/types/query_type.rb on lines 383..410
        app/graphql/types/query_type.rb on lines 425..452
        app/graphql/types/query_type.rb on lines 467..494
        app/graphql/types/query_type.rb on lines 549..576
        app/graphql/types/query_type.rb on lines 591..618
        app/graphql/types/query_type.rb on lines 633..660
        app/graphql/types/query_type.rb on lines 675..702
        app/graphql/types/query_type.rb on lines 760..787
        app/graphql/types/query_type.rb on lines 802..829
        app/graphql/types/query_type.rb on lines 844..871
        app/graphql/types/query_type.rb on lines 886..913
        app/graphql/types/query_type.rb on lines 972..999
        app/graphql/types/query_type.rb on lines 1015..1042
        app/graphql/types/query_type.rb on lines 1058..1085
        app/graphql/types/query_type.rb on lines 1101..1128
        app/graphql/types/query_type.rb on lines 1144..1171
        app/graphql/types/query_type.rb on lines 1187..1214
        app/graphql/types/query_type.rb on lines 1230..1257
        app/graphql/types/query_type.rb on lines 1273..1300

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 169.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 22 locations. Consider refactoring.
        Open

          field :peer_reviews, PeerReviewConnectionWithTotalType, null: false do
            argument :query, String, required: false
            argument :ids, [String], required: false
            argument :published, String, required: false
            argument :user_id, String, required: false
        Severity: Major
        Found in app/graphql/types/query_type.rb and 21 other locations - About 5 hrs to fix
        app/graphql/types/query_type.rb on lines 299..326
        app/graphql/types/query_type.rb on lines 341..368
        app/graphql/types/query_type.rb on lines 383..410
        app/graphql/types/query_type.rb on lines 425..452
        app/graphql/types/query_type.rb on lines 467..494
        app/graphql/types/query_type.rb on lines 549..576
        app/graphql/types/query_type.rb on lines 591..618
        app/graphql/types/query_type.rb on lines 633..660
        app/graphql/types/query_type.rb on lines 675..702
        app/graphql/types/query_type.rb on lines 760..787
        app/graphql/types/query_type.rb on lines 802..829
        app/graphql/types/query_type.rb on lines 844..871
        app/graphql/types/query_type.rb on lines 886..913
        app/graphql/types/query_type.rb on lines 929..956
        app/graphql/types/query_type.rb on lines 972..999
        app/graphql/types/query_type.rb on lines 1058..1085
        app/graphql/types/query_type.rb on lines 1101..1128
        app/graphql/types/query_type.rb on lines 1144..1171
        app/graphql/types/query_type.rb on lines 1187..1214
        app/graphql/types/query_type.rb on lines 1230..1257
        app/graphql/types/query_type.rb on lines 1273..1300

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 169.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 22 locations. Consider refactoring.
        Open

          field :softwares, SoftwareConnectionWithTotalType, null: false do
            argument :query, String, required: false
            argument :ids, [String], required: false
            argument :published, String, required: false
            argument :user_id, String, required: false
        Severity: Major
        Found in app/graphql/types/query_type.rb and 21 other locations - About 5 hrs to fix
        app/graphql/types/query_type.rb on lines 299..326
        app/graphql/types/query_type.rb on lines 341..368
        app/graphql/types/query_type.rb on lines 383..410
        app/graphql/types/query_type.rb on lines 425..452
        app/graphql/types/query_type.rb on lines 467..494
        app/graphql/types/query_type.rb on lines 549..576
        app/graphql/types/query_type.rb on lines 591..618
        app/graphql/types/query_type.rb on lines 633..660
        app/graphql/types/query_type.rb on lines 675..702
        app/graphql/types/query_type.rb on lines 802..829
        app/graphql/types/query_type.rb on lines 844..871
        app/graphql/types/query_type.rb on lines 886..913
        app/graphql/types/query_type.rb on lines 929..956
        app/graphql/types/query_type.rb on lines 972..999
        app/graphql/types/query_type.rb on lines 1015..1042
        app/graphql/types/query_type.rb on lines 1058..1085
        app/graphql/types/query_type.rb on lines 1101..1128
        app/graphql/types/query_type.rb on lines 1144..1171
        app/graphql/types/query_type.rb on lines 1187..1214
        app/graphql/types/query_type.rb on lines 1230..1257
        app/graphql/types/query_type.rb on lines 1273..1300

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 169.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 22 locations. Consider refactoring.
        Open

          field :data_papers, DataPaperConnectionWithTotalType, null: false do
            argument :query, String, required: false
            argument :ids, [String], required: false
            argument :published, String, required: false
            argument :user_id, String, required: false
        Severity: Major
        Found in app/graphql/types/query_type.rb and 21 other locations - About 5 hrs to fix
        app/graphql/types/query_type.rb on lines 299..326
        app/graphql/types/query_type.rb on lines 341..368
        app/graphql/types/query_type.rb on lines 383..410
        app/graphql/types/query_type.rb on lines 425..452
        app/graphql/types/query_type.rb on lines 549..576
        app/graphql/types/query_type.rb on lines 591..618
        app/graphql/types/query_type.rb on lines 633..660
        app/graphql/types/query_type.rb on lines 675..702
        app/graphql/types/query_type.rb on lines 760..787
        app/graphql/types/query_type.rb on lines 802..829
        app/graphql/types/query_type.rb on lines 844..871
        app/graphql/types/query_type.rb on lines 886..913
        app/graphql/types/query_type.rb on lines 929..956
        app/graphql/types/query_type.rb on lines 972..999
        app/graphql/types/query_type.rb on lines 1015..1042
        app/graphql/types/query_type.rb on lines 1058..1085
        app/graphql/types/query_type.rb on lines 1101..1128
        app/graphql/types/query_type.rb on lines 1144..1171
        app/graphql/types/query_type.rb on lines 1187..1214
        app/graphql/types/query_type.rb on lines 1230..1257
        app/graphql/types/query_type.rb on lines 1273..1300

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 169.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 22 locations. Consider refactoring.
        Open

          field :others, OtherConnectionWithTotalType, null: false do
            argument :query, String, required: false
            argument :ids, [String], required: false
            argument :published, String, required: false
            argument :user_id, String, required: false
        Severity: Major
        Found in app/graphql/types/query_type.rb and 21 other locations - About 5 hrs to fix
        app/graphql/types/query_type.rb on lines 299..326
        app/graphql/types/query_type.rb on lines 341..368
        app/graphql/types/query_type.rb on lines 383..410
        app/graphql/types/query_type.rb on lines 425..452
        app/graphql/types/query_type.rb on lines 467..494
        app/graphql/types/query_type.rb on lines 549..576
        app/graphql/types/query_type.rb on lines 591..618
        app/graphql/types/query_type.rb on lines 633..660
        app/graphql/types/query_type.rb on lines 675..702
        app/graphql/types/query_type.rb on lines 760..787
        app/graphql/types/query_type.rb on lines 802..829
        app/graphql/types/query_type.rb on lines 844..871
        app/graphql/types/query_type.rb on lines 886..913
        app/graphql/types/query_type.rb on lines 929..956
        app/graphql/types/query_type.rb on lines 972..999
        app/graphql/types/query_type.rb on lines 1015..1042
        app/graphql/types/query_type.rb on lines 1058..1085
        app/graphql/types/query_type.rb on lines 1101..1128
        app/graphql/types/query_type.rb on lines 1144..1171
        app/graphql/types/query_type.rb on lines 1187..1214
        app/graphql/types/query_type.rb on lines 1230..1257

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 169.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 22 locations. Consider refactoring.
        Open

          field :images, ImageConnectionWithTotalType, null: false do
            argument :query, String, required: false
            argument :ids, [String], required: false
            argument :published, String, required: false
            argument :user_id, String, required: false
        Severity: Major
        Found in app/graphql/types/query_type.rb and 21 other locations - About 5 hrs to fix
        app/graphql/types/query_type.rb on lines 299..326
        app/graphql/types/query_type.rb on lines 341..368
        app/graphql/types/query_type.rb on lines 383..410
        app/graphql/types/query_type.rb on lines 425..452
        app/graphql/types/query_type.rb on lines 467..494
        app/graphql/types/query_type.rb on lines 591..618
        app/graphql/types/query_type.rb on lines 633..660
        app/graphql/types/query_type.rb on lines 675..702
        app/graphql/types/query_type.rb on lines 760..787
        app/graphql/types/query_type.rb on lines 802..829
        app/graphql/types/query_type.rb on lines 844..871
        app/graphql/types/query_type.rb on lines 886..913
        app/graphql/types/query_type.rb on lines 929..956
        app/graphql/types/query_type.rb on lines 972..999
        app/graphql/types/query_type.rb on lines 1015..1042
        app/graphql/types/query_type.rb on lines 1058..1085
        app/graphql/types/query_type.rb on lines 1101..1128
        app/graphql/types/query_type.rb on lines 1144..1171
        app/graphql/types/query_type.rb on lines 1187..1214
        app/graphql/types/query_type.rb on lines 1230..1257
        app/graphql/types/query_type.rb on lines 1273..1300

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 169.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 22 locations. Consider refactoring.
        Open

          field :preprints, PreprintConnectionWithTotalType, null: false do
            argument :query, String, required: false
            argument :ids, [String], required: false
            argument :published, String, required: false
            argument :user_id, String, required: false
        Severity: Major
        Found in app/graphql/types/query_type.rb and 21 other locations - About 5 hrs to fix
        app/graphql/types/query_type.rb on lines 299..326
        app/graphql/types/query_type.rb on lines 341..368
        app/graphql/types/query_type.rb on lines 383..410
        app/graphql/types/query_type.rb on lines 425..452
        app/graphql/types/query_type.rb on lines 467..494
        app/graphql/types/query_type.rb on lines 549..576
        app/graphql/types/query_type.rb on lines 591..618
        app/graphql/types/query_type.rb on lines 633..660
        app/graphql/types/query_type.rb on lines 675..702
        app/graphql/types/query_type.rb on lines 760..787
        app/graphql/types/query_type.rb on lines 802..829
        app/graphql/types/query_type.rb on lines 844..871
        app/graphql/types/query_type.rb on lines 886..913
        app/graphql/types/query_type.rb on lines 929..956
        app/graphql/types/query_type.rb on lines 1015..1042
        app/graphql/types/query_type.rb on lines 1058..1085
        app/graphql/types/query_type.rb on lines 1101..1128
        app/graphql/types/query_type.rb on lines 1144..1171
        app/graphql/types/query_type.rb on lines 1187..1214
        app/graphql/types/query_type.rb on lines 1230..1257
        app/graphql/types/query_type.rb on lines 1273..1300

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 169.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 22 locations. Consider refactoring.
        Open

          field :instruments, InstrumentConnectionWithTotalType, null: false do
            argument :query, String, required: false
            argument :ids, [String], required: false
            argument :published, String, required: false
            argument :user_id, String, required: false
        Severity: Major
        Found in app/graphql/types/query_type.rb and 21 other locations - About 5 hrs to fix
        app/graphql/types/query_type.rb on lines 299..326
        app/graphql/types/query_type.rb on lines 341..368
        app/graphql/types/query_type.rb on lines 383..410
        app/graphql/types/query_type.rb on lines 425..452
        app/graphql/types/query_type.rb on lines 467..494
        app/graphql/types/query_type.rb on lines 549..576
        app/graphql/types/query_type.rb on lines 591..618
        app/graphql/types/query_type.rb on lines 633..660
        app/graphql/types/query_type.rb on lines 675..702
        app/graphql/types/query_type.rb on lines 760..787
        app/graphql/types/query_type.rb on lines 802..829
        app/graphql/types/query_type.rb on lines 844..871
        app/graphql/types/query_type.rb on lines 886..913
        app/graphql/types/query_type.rb on lines 929..956
        app/graphql/types/query_type.rb on lines 972..999
        app/graphql/types/query_type.rb on lines 1015..1042
        app/graphql/types/query_type.rb on lines 1058..1085
        app/graphql/types/query_type.rb on lines 1101..1128
        app/graphql/types/query_type.rb on lines 1144..1171
        app/graphql/types/query_type.rb on lines 1187..1214
        app/graphql/types/query_type.rb on lines 1273..1300

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 169.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 22 locations. Consider refactoring.
        Open

          field :sounds, SoundConnectionWithTotalType, null: false do
            argument :query, String, required: false
            argument :ids, [String], required: false
            argument :published, String, required: false
            argument :user_id, String, required: false
        Severity: Major
        Found in app/graphql/types/query_type.rb and 21 other locations - About 5 hrs to fix
        app/graphql/types/query_type.rb on lines 299..326
        app/graphql/types/query_type.rb on lines 341..368
        app/graphql/types/query_type.rb on lines 383..410
        app/graphql/types/query_type.rb on lines 425..452
        app/graphql/types/query_type.rb on lines 467..494
        app/graphql/types/query_type.rb on lines 549..576
        app/graphql/types/query_type.rb on lines 591..618
        app/graphql/types/query_type.rb on lines 633..660
        app/graphql/types/query_type.rb on lines 675..702
        app/graphql/types/query_type.rb on lines 760..787
        app/graphql/types/query_type.rb on lines 844..871
        app/graphql/types/query_type.rb on lines 886..913
        app/graphql/types/query_type.rb on lines 929..956
        app/graphql/types/query_type.rb on lines 972..999
        app/graphql/types/query_type.rb on lines 1015..1042
        app/graphql/types/query_type.rb on lines 1058..1085
        app/graphql/types/query_type.rb on lines 1101..1128
        app/graphql/types/query_type.rb on lines 1144..1171
        app/graphql/types/query_type.rb on lines 1187..1214
        app/graphql/types/query_type.rb on lines 1230..1257
        app/graphql/types/query_type.rb on lines 1273..1300

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 169.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 22 locations. Consider refactoring.
        Open

          field :book_chapters, BookChapterConnectionWithTotalType, null: false do
            argument :query, String, required: false
            argument :ids, [String], required: false
            argument :published, String, required: false
            argument :user_id, String, required: false
        Severity: Major
        Found in app/graphql/types/query_type.rb and 21 other locations - About 5 hrs to fix
        app/graphql/types/query_type.rb on lines 299..326
        app/graphql/types/query_type.rb on lines 341..368
        app/graphql/types/query_type.rb on lines 383..410
        app/graphql/types/query_type.rb on lines 425..452
        app/graphql/types/query_type.rb on lines 467..494
        app/graphql/types/query_type.rb on lines 549..576
        app/graphql/types/query_type.rb on lines 591..618
        app/graphql/types/query_type.rb on lines 633..660
        app/graphql/types/query_type.rb on lines 675..702
        app/graphql/types/query_type.rb on lines 760..787
        app/graphql/types/query_type.rb on lines 802..829
        app/graphql/types/query_type.rb on lines 844..871
        app/graphql/types/query_type.rb on lines 886..913
        app/graphql/types/query_type.rb on lines 929..956
        app/graphql/types/query_type.rb on lines 972..999
        app/graphql/types/query_type.rb on lines 1015..1042
        app/graphql/types/query_type.rb on lines 1058..1085
        app/graphql/types/query_type.rb on lines 1144..1171
        app/graphql/types/query_type.rb on lines 1187..1214
        app/graphql/types/query_type.rb on lines 1230..1257
        app/graphql/types/query_type.rb on lines 1273..1300

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 169.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 22 locations. Consider refactoring.
        Open

          field :workflows, WorkflowConnectionWithTotalType, null: false do
            argument :query, String, required: false
            argument :ids, [String], required: false
            argument :published, String, required: false
            argument :user_id, String, required: false
        Severity: Major
        Found in app/graphql/types/query_type.rb and 21 other locations - About 5 hrs to fix
        app/graphql/types/query_type.rb on lines 299..326
        app/graphql/types/query_type.rb on lines 341..368
        app/graphql/types/query_type.rb on lines 383..410
        app/graphql/types/query_type.rb on lines 425..452
        app/graphql/types/query_type.rb on lines 467..494
        app/graphql/types/query_type.rb on lines 549..576
        app/graphql/types/query_type.rb on lines 591..618
        app/graphql/types/query_type.rb on lines 633..660
        app/graphql/types/query_type.rb on lines 675..702
        app/graphql/types/query_type.rb on lines 760..787
        app/graphql/types/query_type.rb on lines 802..829
        app/graphql/types/query_type.rb on lines 886..913
        app/graphql/types/query_type.rb on lines 929..956
        app/graphql/types/query_type.rb on lines 972..999
        app/graphql/types/query_type.rb on lines 1015..1042
        app/graphql/types/query_type.rb on lines 1058..1085
        app/graphql/types/query_type.rb on lines 1101..1128
        app/graphql/types/query_type.rb on lines 1144..1171
        app/graphql/types/query_type.rb on lines 1187..1214
        app/graphql/types/query_type.rb on lines 1230..1257
        app/graphql/types/query_type.rb on lines 1273..1300

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 169.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 22 locations. Consider refactoring.
        Open

          field :models, ModelConnectionWithTotalType, null: false do
            argument :query, String, required: false
            argument :ids, [String], required: false
            argument :published, String, required: false
            argument :user_id, String, required: false
        Severity: Major
        Found in app/graphql/types/query_type.rb and 21 other locations - About 5 hrs to fix
        app/graphql/types/query_type.rb on lines 299..326
        app/graphql/types/query_type.rb on lines 341..368
        app/graphql/types/query_type.rb on lines 383..410
        app/graphql/types/query_type.rb on lines 425..452
        app/graphql/types/query_type.rb on lines 467..494
        app/graphql/types/query_type.rb on lines 549..576
        app/graphql/types/query_type.rb on lines 591..618
        app/graphql/types/query_type.rb on lines 675..702
        app/graphql/types/query_type.rb on lines 760..787
        app/graphql/types/query_type.rb on lines 802..829
        app/graphql/types/query_type.rb on lines 844..871
        app/graphql/types/query_type.rb on lines 886..913
        app/graphql/types/query_type.rb on lines 929..956
        app/graphql/types/query_type.rb on lines 972..999
        app/graphql/types/query_type.rb on lines 1015..1042
        app/graphql/types/query_type.rb on lines 1058..1085
        app/graphql/types/query_type.rb on lines 1101..1128
        app/graphql/types/query_type.rb on lines 1144..1171
        app/graphql/types/query_type.rb on lines 1187..1214
        app/graphql/types/query_type.rb on lines 1230..1257
        app/graphql/types/query_type.rb on lines 1273..1300

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 169.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 22 locations. Consider refactoring.
        Open

          field :conference_papers, ConferencePaperConnectionWithTotalType, null: false do
            argument :query, String, required: false
            argument :ids, [String], required: false
            argument :published, String, required: false
            argument :user_id, String, required: false
        Severity: Major
        Found in app/graphql/types/query_type.rb and 21 other locations - About 5 hrs to fix
        app/graphql/types/query_type.rb on lines 299..326
        app/graphql/types/query_type.rb on lines 341..368
        app/graphql/types/query_type.rb on lines 383..410
        app/graphql/types/query_type.rb on lines 425..452
        app/graphql/types/query_type.rb on lines 467..494
        app/graphql/types/query_type.rb on lines 549..576
        app/graphql/types/query_type.rb on lines 591..618
        app/graphql/types/query_type.rb on lines 633..660
        app/graphql/types/query_type.rb on lines 675..702
        app/graphql/types/query_type.rb on lines 760..787
        app/graphql/types/query_type.rb on lines 802..829
        app/graphql/types/query_type.rb on lines 844..871
        app/graphql/types/query_type.rb on lines 886..913
        app/graphql/types/query_type.rb on lines 929..956
        app/graphql/types/query_type.rb on lines 972..999
        app/graphql/types/query_type.rb on lines 1015..1042
        app/graphql/types/query_type.rb on lines 1101..1128
        app/graphql/types/query_type.rb on lines 1144..1171
        app/graphql/types/query_type.rb on lines 1187..1214
        app/graphql/types/query_type.rb on lines 1230..1257
        app/graphql/types/query_type.rb on lines 1273..1300

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 169.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 22 locations. Consider refactoring.
        Open

          field :books, BookConnectionWithTotalType, null: false do
            argument :query, String, required: false
            argument :ids, [String], required: false
            argument :published, String, required: false
            argument :user_id, String, required: false
        Severity: Major
        Found in app/graphql/types/query_type.rb and 21 other locations - About 5 hrs to fix
        app/graphql/types/query_type.rb on lines 299..326
        app/graphql/types/query_type.rb on lines 341..368
        app/graphql/types/query_type.rb on lines 383..410
        app/graphql/types/query_type.rb on lines 425..452
        app/graphql/types/query_type.rb on lines 467..494
        app/graphql/types/query_type.rb on lines 549..576
        app/graphql/types/query_type.rb on lines 591..618
        app/graphql/types/query_type.rb on lines 633..660
        app/graphql/types/query_type.rb on lines 675..702
        app/graphql/types/query_type.rb on lines 760..787
        app/graphql/types/query_type.rb on lines 802..829
        app/graphql/types/query_type.rb on lines 844..871
        app/graphql/types/query_type.rb on lines 886..913
        app/graphql/types/query_type.rb on lines 929..956
        app/graphql/types/query_type.rb on lines 972..999
        app/graphql/types/query_type.rb on lines 1015..1042
        app/graphql/types/query_type.rb on lines 1058..1085
        app/graphql/types/query_type.rb on lines 1101..1128
        app/graphql/types/query_type.rb on lines 1187..1214
        app/graphql/types/query_type.rb on lines 1230..1257
        app/graphql/types/query_type.rb on lines 1273..1300

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 169.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 22 locations. Consider refactoring.
        Open

          field :physical_objects, PhysicalObjectConnectionWithTotalType, null: false do
            argument :query, String, required: false
            argument :ids, [String], required: false
            argument :published, String, required: false
            argument :user_id, String, required: false
        Severity: Major
        Found in app/graphql/types/query_type.rb and 21 other locations - About 5 hrs to fix
        app/graphql/types/query_type.rb on lines 299..326
        app/graphql/types/query_type.rb on lines 341..368
        app/graphql/types/query_type.rb on lines 383..410
        app/graphql/types/query_type.rb on lines 425..452
        app/graphql/types/query_type.rb on lines 467..494
        app/graphql/types/query_type.rb on lines 549..576
        app/graphql/types/query_type.rb on lines 591..618
        app/graphql/types/query_type.rb on lines 633..660
        app/graphql/types/query_type.rb on lines 760..787
        app/graphql/types/query_type.rb on lines 802..829
        app/graphql/types/query_type.rb on lines 844..871
        app/graphql/types/query_type.rb on lines 886..913
        app/graphql/types/query_type.rb on lines 929..956
        app/graphql/types/query_type.rb on lines 972..999
        app/graphql/types/query_type.rb on lines 1015..1042
        app/graphql/types/query_type.rb on lines 1058..1085
        app/graphql/types/query_type.rb on lines 1101..1128
        app/graphql/types/query_type.rb on lines 1144..1171
        app/graphql/types/query_type.rb on lines 1187..1214
        app/graphql/types/query_type.rb on lines 1230..1257
        app/graphql/types/query_type.rb on lines 1273..1300

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 169.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

          field :people, PersonConnectionWithTotalType, null: false do
            argument :query, String, required: false
            argument :first, Int, required: false, default_value: 25
            argument :after, String, required: false
          end
        Severity: Minor
        Found in app/graphql/types/query_type.rb and 2 other locations - About 20 mins to fix
        app/graphql/types/query_type.rb on lines 80..84
        app/graphql/types/query_type.rb on lines 99..103

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 28.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

          field :funders, FunderConnectionWithTotalType, null: false do
            argument :query, String, required: false
            argument :first, Int, required: false, default_value: 25
            argument :after, String, required: false
          end
        Severity: Minor
        Found in app/graphql/types/query_type.rb and 2 other locations - About 20 mins to fix
        app/graphql/types/query_type.rb on lines 80..84
        app/graphql/types/query_type.rb on lines 204..208

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 28.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

          field :prefixes, PrefixConnectionWithTotalType, null: false do
            argument :query, String, required: false
            argument :first, Int, required: false, default_value: 25
            argument :after, String, required: false
          end
        Severity: Minor
        Found in app/graphql/types/query_type.rb and 2 other locations - About 20 mins to fix
        app/graphql/types/query_type.rb on lines 99..103
        app/graphql/types/query_type.rb on lines 204..208

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 28.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 13 locations. Consider refactoring.
        Open

          def dissertations(**args)
            args[:resource_type_id] = "Text"
            args[:resource_type] = "Dissertation,Thesis"
            ElasticsearchModelResponseConnection.new(response(**args), context: context, first: args[:first], after: args[:after])
        Severity: Major
        Found in app/graphql/types/query_type.rb and 12 other locations - About 20 mins to fix
        app/graphql/types/funder_type.rb on lines 203..209
        app/graphql/types/member_type.rb on lines 260..266
        app/graphql/types/organization_type.rb on lines 290..296
        app/graphql/types/query_type.rb on lines 958..961
        app/graphql/types/query_type.rb on lines 1001..1004
        app/graphql/types/query_type.rb on lines 1044..1047
        app/graphql/types/query_type.rb on lines 1087..1090
        app/graphql/types/query_type.rb on lines 1130..1133
        app/graphql/types/query_type.rb on lines 1173..1176
        app/graphql/types/query_type.rb on lines 1216..1219
        app/graphql/types/query_type.rb on lines 1259..1262
        app/graphql/types/repository_type.rb on lines 309..315

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 27.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 13 locations. Consider refactoring.
        Open

          def peer_reviews(**args)
            args[:resource_type_id] = "Text"
            args[:resource_type] = "\"Peer review\""
            ElasticsearchModelResponseConnection.new(response(**args), context: context, first: args[:first], after: args[:after])
        Severity: Major
        Found in app/graphql/types/query_type.rb and 12 other locations - About 20 mins to fix
        app/graphql/types/funder_type.rb on lines 203..209
        app/graphql/types/member_type.rb on lines 260..266
        app/graphql/types/organization_type.rb on lines 290..296
        app/graphql/types/query_type.rb on lines 915..918
        app/graphql/types/query_type.rb on lines 958..961
        app/graphql/types/query_type.rb on lines 1001..1004
        app/graphql/types/query_type.rb on lines 1087..1090
        app/graphql/types/query_type.rb on lines 1130..1133
        app/graphql/types/query_type.rb on lines 1173..1176
        app/graphql/types/query_type.rb on lines 1216..1219
        app/graphql/types/query_type.rb on lines 1259..1262
        app/graphql/types/repository_type.rb on lines 309..315

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 27.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 13 locations. Consider refactoring.
        Open

          def books(**args)
            args[:resource_type_id] = "Text"
            args[:resource_type] = "Book"
            ElasticsearchModelResponseConnection.new(response(**args), context: context, first: args[:first], after: args[:after])
        Severity: Major
        Found in app/graphql/types/query_type.rb and 12 other locations - About 20 mins to fix
        app/graphql/types/funder_type.rb on lines 203..209
        app/graphql/types/member_type.rb on lines 260..266
        app/graphql/types/organization_type.rb on lines 290..296
        app/graphql/types/query_type.rb on lines 915..918
        app/graphql/types/query_type.rb on lines 958..961
        app/graphql/types/query_type.rb on lines 1001..1004
        app/graphql/types/query_type.rb on lines 1044..1047
        app/graphql/types/query_type.rb on lines 1087..1090
        app/graphql/types/query_type.rb on lines 1130..1133
        app/graphql/types/query_type.rb on lines 1216..1219
        app/graphql/types/query_type.rb on lines 1259..1262
        app/graphql/types/repository_type.rb on lines 309..315

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 27.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 13 locations. Consider refactoring.
        Open

          def instruments(**args)
            args[:resource_type_id] = "Other"
            args[:resource_type] = "Instrument"
            ElasticsearchModelResponseConnection.new(response(**args), context: context, first: args[:first], after: args[:after])
        Severity: Major
        Found in app/graphql/types/query_type.rb and 12 other locations - About 20 mins to fix
        app/graphql/types/funder_type.rb on lines 203..209
        app/graphql/types/member_type.rb on lines 260..266
        app/graphql/types/organization_type.rb on lines 290..296
        app/graphql/types/query_type.rb on lines 915..918
        app/graphql/types/query_type.rb on lines 958..961
        app/graphql/types/query_type.rb on lines 1001..1004
        app/graphql/types/query_type.rb on lines 1044..1047
        app/graphql/types/query_type.rb on lines 1087..1090
        app/graphql/types/query_type.rb on lines 1130..1133
        app/graphql/types/query_type.rb on lines 1173..1176
        app/graphql/types/query_type.rb on lines 1216..1219
        app/graphql/types/repository_type.rb on lines 309..315

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 27.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 13 locations. Consider refactoring.
        Open

          def journal_articles(**args)
            args[:resource_type_id] = "Text"
            args[:resource_type] = "JournalArticle"
            ElasticsearchModelResponseConnection.new(response(**args), context: context, first: args[:first], after: args[:after])
        Severity: Major
        Found in app/graphql/types/query_type.rb and 12 other locations - About 20 mins to fix
        app/graphql/types/funder_type.rb on lines 203..209
        app/graphql/types/member_type.rb on lines 260..266
        app/graphql/types/organization_type.rb on lines 290..296
        app/graphql/types/query_type.rb on lines 915..918
        app/graphql/types/query_type.rb on lines 958..961
        app/graphql/types/query_type.rb on lines 1001..1004
        app/graphql/types/query_type.rb on lines 1044..1047
        app/graphql/types/query_type.rb on lines 1087..1090
        app/graphql/types/query_type.rb on lines 1130..1133
        app/graphql/types/query_type.rb on lines 1173..1176
        app/graphql/types/query_type.rb on lines 1259..1262
        app/graphql/types/repository_type.rb on lines 309..315

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 27.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 13 locations. Consider refactoring.
        Open

          def book_chapters(**args)
            args[:resource_type_id] = "Text"
            args[:resource_type] = "BookChapter"
            ElasticsearchModelResponseConnection.new(response(**args), context: context, first: args[:first], after: args[:after])
        Severity: Major
        Found in app/graphql/types/query_type.rb and 12 other locations - About 20 mins to fix
        app/graphql/types/funder_type.rb on lines 203..209
        app/graphql/types/member_type.rb on lines 260..266
        app/graphql/types/organization_type.rb on lines 290..296
        app/graphql/types/query_type.rb on lines 915..918
        app/graphql/types/query_type.rb on lines 958..961
        app/graphql/types/query_type.rb on lines 1001..1004
        app/graphql/types/query_type.rb on lines 1044..1047
        app/graphql/types/query_type.rb on lines 1087..1090
        app/graphql/types/query_type.rb on lines 1173..1176
        app/graphql/types/query_type.rb on lines 1216..1219
        app/graphql/types/query_type.rb on lines 1259..1262
        app/graphql/types/repository_type.rb on lines 309..315

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 27.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 13 locations. Consider refactoring.
        Open

          def data_management_plans(**args)
            args[:resource_type_id] = "Text"
            args[:resource_type] = "Data Management Plan"
            ElasticsearchModelResponseConnection.new(response(**args), context: context, first: args[:first], after: args[:after])
        Severity: Major
        Found in app/graphql/types/query_type.rb and 12 other locations - About 20 mins to fix
        app/graphql/types/funder_type.rb on lines 203..209
        app/graphql/types/member_type.rb on lines 260..266
        app/graphql/types/organization_type.rb on lines 290..296
        app/graphql/types/query_type.rb on lines 915..918
        app/graphql/types/query_type.rb on lines 1001..1004
        app/graphql/types/query_type.rb on lines 1044..1047
        app/graphql/types/query_type.rb on lines 1087..1090
        app/graphql/types/query_type.rb on lines 1130..1133
        app/graphql/types/query_type.rb on lines 1173..1176
        app/graphql/types/query_type.rb on lines 1216..1219
        app/graphql/types/query_type.rb on lines 1259..1262
        app/graphql/types/repository_type.rb on lines 309..315

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 27.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 13 locations. Consider refactoring.
        Open

          def conference_papers(**args)
            args[:resource_type_id] = "Text"
            args[:resource_type] = "\"Conference paper\""
            ElasticsearchModelResponseConnection.new(response(**args), context: context, first: args[:first], after: args[:after])
        Severity: Major
        Found in app/graphql/types/query_type.rb and 12 other locations - About 20 mins to fix
        app/graphql/types/funder_type.rb on lines 203..209
        app/graphql/types/member_type.rb on lines 260..266
        app/graphql/types/organization_type.rb on lines 290..296
        app/graphql/types/query_type.rb on lines 915..918
        app/graphql/types/query_type.rb on lines 958..961
        app/graphql/types/query_type.rb on lines 1001..1004
        app/graphql/types/query_type.rb on lines 1044..1047
        app/graphql/types/query_type.rb on lines 1130..1133
        app/graphql/types/query_type.rb on lines 1173..1176
        app/graphql/types/query_type.rb on lines 1216..1219
        app/graphql/types/query_type.rb on lines 1259..1262
        app/graphql/types/repository_type.rb on lines 309..315

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 27.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 13 locations. Consider refactoring.
        Open

          def preprints(**args)
            args[:resource_type_id] = "Text"
            args[:resource_type] = "PostedContent,Preprint"
            ElasticsearchModelResponseConnection.new(response(**args), context: context, first: args[:first], after: args[:after])
        Severity: Major
        Found in app/graphql/types/query_type.rb and 12 other locations - About 20 mins to fix
        app/graphql/types/funder_type.rb on lines 203..209
        app/graphql/types/member_type.rb on lines 260..266
        app/graphql/types/organization_type.rb on lines 290..296
        app/graphql/types/query_type.rb on lines 915..918
        app/graphql/types/query_type.rb on lines 958..961
        app/graphql/types/query_type.rb on lines 1044..1047
        app/graphql/types/query_type.rb on lines 1087..1090
        app/graphql/types/query_type.rb on lines 1130..1133
        app/graphql/types/query_type.rb on lines 1173..1176
        app/graphql/types/query_type.rb on lines 1216..1219
        app/graphql/types/query_type.rb on lines 1259..1262
        app/graphql/types/repository_type.rb on lines 309..315

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 27.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        There are no issues that match your filters.

        Category
        Status