Kql Versions Save

Kirby's Query Language API combines the flexibility of Kirby's data structures, the power of GraphQL and the simplicity of REST.

2.1.0

6 months ago

🎉 Features

  • KQL is now compatible with Kirby 4 thanks to @johannschopplich

✨ Enhancements

  • All doc examples are now pure fetch without dependencies
  • Added 11ty kit to the readme

2.0.0

1 year ago

🚀 Features

✨ Enhancements

  • KQL is now based on the new Kirby\Query classes, profiting from all their enhancements
  • Help class now also supports objects without interceptor that have been explicitly allowed via config
  • Added unit tests and CI

♻️ Refactoring

  • Kirby\Kql\Interceptors\Interceptor got merged into Kirby\Kql\Interceptor. A class alias for the old name has been added.
  • General clean-up of code and improvements to consistent code style

🚨 Breaking changes

  • Requires Kirby 3.8.2

1.3.0-rc.1

1 year ago

⚠️ Requires Kirby 3.8.2

🚀 Features

✨ Enhancements

  • KQL is now based on the new Kirby\Query classes, profiting from all their enhancements
  • Help class now also supports objects without interceptor that have been explicitly allowed via config
  • Added unit tests and CI

♻️ Refactoring

  • Kirby\Kql\Interceptors\Interceptor got merged into Kirby\Kql\Interceptor. A class alias for the old name has been added.
  • General clean-up of code and improvements to consistent code style

1.2.0

1 year ago

Features

  • Support for the new UUIDs in 3.8
  • Support for plugin update checks in 3.8

Enhancements

  • Updated CS Fixer rules

1.1.0

1 year ago

Features

Support for field method aliases #33

{
  "query": "site.description.kt"
}

New option to switch off authentication for KQL

<?php 

return [
  'kql' => [
    'auth' => false
  ]
];

Allow and block lists for custom methods and classes

<?php

return [
  'kql' => [
    'classes' => [
      'blocked' => [
        'Kirby\Cms\User'
      ]
    ],
    'methods' => [
      'allowed' => [
        'AlbumPage::cover'
      ],
      'blocked' => [
        'Kirby\Cms\App::version'
      ]
    ]
  ]
];

You can also use doc block comments in custom model methods, custom page methods, etc. to allow a method in KQL

class AlbumPage extends Page
{
  /**
   * @kql-allowed
   */
  public function cover()
  {
    return $this->images()->findBy('name', 'cover') ?? $this->image();
  }
}

Custom interceptor support

<?php

return [
  'kql' => [
    'interceptors' => [
      'Kirby\Cms\System' => 'SystemInterceptor'
    ]
  ]
];

New collection shortcut

{
  "query": "collection('notes')"
}

Enhancements

Fixes

  • Fixed pagination issue #28
  • Throw proper permission exception in interceptors
  • Fixed issue in license
  • Fixed test setup in sandbox

1.1.0-rc.1

1 year ago

Features

Support for field method aliases #33

{
  "query": "site.description.kt"
}

New option to switch off authentication for KQL

<?php 

return [
  'kql' => [
    'auth' => false
  ]
];

Allow and block lists for custom methods and classes

<?php

return [
  'kql' => [
    'classes' => [
      'blocked' => [
        'Kirby\Cms\User'
      ]
    ],
    'methods' => [
      'allowed' => [
        'AlbumPage::cover'
      ],
      'blocked' => [
        'Kirby\Cms\App::version'
      ]
    ]
  ]
];

You can also use doc block comments in custom model methods, custom page methods, etc. to allow a method in KQL

class AlbumPage extends Page
{
  /**
   * @kql-allowed
   */
  public function cover()
  {
    return $this->images()->findBy('name', 'cover') ?? $this->image();
  }
}

Custom interceptor support

<?php

return [
  'kql' => [
    'interceptors' => [
      'Kirby\Cms\System' => 'SystemInterceptor'
    ]
  ]
];

New collection shortcut

{
  "query": "collection('notes')"
}

Fixes

  • Fixed pagination issue #28
  • Throw proper permission exception in interceptors
  • Fixed issue in license
  • Fixed test setup in sandbox

1.0.0

3 years ago

It's time to make it official. With the latest changes, KQL is ready to be used with the latest Kirby version and has now full support for the new Blocks and Layouts.

Have fun :)