Uploaded image for project: 'Magnolia GraphQL'
  1. Magnolia GraphQL
  2. MGNLGQL-65

Make behavior of data fetching consistent across content types

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Neutral
    • 1.0
    • None
    • None
    • Yes
    • HL & LD 18, HL & LD 19, HL & LD 20
    • 5

    Description

      We have inconsistencies in behavior for queries for content types and assets.
      The queries

      {
        assets {
           ...
        }
      }
      # and
      {
        assets(path: "/") {
          ...
        }
      }
      

      returns all assets located under the root.
      The following query

      {
        assets(path: "/some/path") {
          ...
        }
      }
      

      returns all assets under the "/some/path" folder.

      The path and id options are not available for content type based items. Such inconsistency in behavior will confuse users of the GraphQL API and should be solved before 1st release.

      After a discussion with rsiska and czimmermann, the following has been proposed to be implemented to be consistent:

      • assets / contentTypes will return all items regardless of folder structure
      • assets(path: "/") or contentTypes(path: "/") will return items directly under the root
      • assets(path: "/some/path") or contentTypes(path: "/some/path") will return items directly located under the specified path

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                jsimak Jaroslav Simak
                jsimak Jaroslav Simak
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoD

                    Time Tracking

                      Estimated:
                      Original Estimate - Not Specified
                      Not Specified
                      Remaining:
                      Remaining Estimate - 0d
                      0d
                      Logged:
                      Time Spent - 1d 5h
                      1d 5h