/*************************************************************************
 * ADOBE CONFIDENTIAL
 * ___________________
 *
 * Copyright 2021 Adobe
 * All Rights Reserved.
 *
 * NOTICE: All information contained herein is, and remains
 * the property of Adobe and its suppliers, if any. The intellectual
 * and technical concepts contained herein are proprietary to Adobe
 * and its suppliers and are protected by all applicable intellectual
 * property laws, including trade secret and copyright laws.
 * Dissemination of this information or reproduction of this material
 * is strictly forbidden unless prior written permission is obtained
 * from Adobe.
 **************************************************************************/

PARTIAL: Content Fragment Models Ibiza Schema
This partial provides a Content Fragment Models schema as an extension to an
Ibiza API plane

REQUIRES: ibiza.content

QUERY: ------------------------------------------------------------------------
"""
Allows retrieving a `ContentFragmentModel` by path.

Arguments:
  - **path** - identifies the `ContentFragmentModel` by path; if the path or the resource
    identify a `ContentFragment`, then its `ContentFragmentModel` will be returned
"""
contentFragmentModel(path: ID!) : ContentFragmentModel @fetcher(name:"ibiza/fetchers/contentResource/cfm")

"""
[Relay connections](https://relay.dev/graphql/connections.htm) paginated query for multiple `ContentFragmentModels`.

Arguments:
  - **path** - identifies the folder from which the ContentFragmentModels should be retrieved;
    the `path` argument can:
      1. point to a `ContentFragmentModel`, in which case the query returns only that result
      2. pont to a `ContentFragment`, in which case the `ContentFragmentModel` of the fragment will be returned
      3. point to a folder in `/conf`, in which case all models from that folder will be retrieved
      4. point to a resource in `/conf`, in which case the query will retrieve all models from the
      first folder in the hierarchy above this resource
      5. be missing or point to something else, in which case all models from `/conf` will be retrieved
  - **after** - [optional] identifies the `Cursor` after which the next results should be retrieved
  - **limit** - [optional] limits the number of results returned
  - **filter** - [optional] an AIQL expression using `ContentFragmentModel` properties that allows
  filtering the results
  - **sort** - [optional] an AIQL expression using `ContentFragmentModel` properties on which to sort
  the returned elements
"""
contentFragmentModels(path: ID!, after: ID, limit: Int, filter: String, sort: String) : ContentFragmentModelConnection @connection(for:
"ContentFragmentModel") @fetcher(name:"ibiza/fetchers/contentResourceConnection/cfm")

TYPES: ------------------------------------------------------------------------

"""
A Content Fragment Model type, abstracting AEM's `FragmentTemplates`.
"""
type ContentFragmentModel implements ContentResource {
  path : ID!
  header: Header!
  links: [Link]!
  backstage: Backstage
  body: UnstructuredContent
}
