github nuwave/lighthouse v2.1-beta.9
GraphQL Security Directives

latest releases: v6.45.0, v6.44.2, v6.44.1...
pre-release6 years ago

Created @security directive which can be set on the Query type with the following options:

type Query @security(introspection: false, depth: 10, complexity: 100) {
    # ...
}

A new @complexity directive has been created which can be attached to fields to calculate complexity (default calculation provided for relationships):

type User {
    # default calculation
    posts: [Post!]! @hasMany @complexity

    # custom calculation
    posts: [Post!]! @hasMany @complexity(resolver: "App\\Http\\GraphQL\\Complexity::userPosts")
}

Read More: https://webonyx.github.io/graphql-php/security/

Don't miss a new lighthouse release

NewReleases is sending notifications on new releases.