# Path: graphene_django_extras/directives/base.py
# class BaseExtraGraphQLDirective(GraphQLDirective):
#     def __init__(self):
#         registry = get_global_registry()
#         super(BaseExtraGraphQLDirective, self).__init__(
#             name=self.get_name(),
#             description=self.__doc__,
#             args=self.get_args(),
#             locations=[
#                 DirectiveLocation.FIELD,
#                 DirectiveLocation.FRAGMENT_SPREAD,
#                 DirectiveLocation.INLINE_FRAGMENT,
#             ],
#         )
#         registry.register_directive(self.get_name(), self)
# 
#     @classmethod
#     def get_name(cls):
#         return to_snake_case(cls.__name__.replace("GraphQLDirective", ""))
# 
#     @staticmethod
#     def get_args():
#         return {}


import random
from graphql import GraphQLArgument, GraphQLNonNull, GraphQLInt
from .base import BaseExtraGraphQLDirective
# -*- coding: utf-8 -*-



__all__ = ("ShuffleGraphQLDirective", "SampleGraphQLDirective")


class ShuffleGraphQLDirective(BaseExtraGraphQLDirective):
    """
    Shuffle the list in place
    """

    @staticmethod
    def resolve(value, directive, root, info, **kwargs):
        if value:
            random.shuffle(value)

        return value



# Path: graphene_django_extras/directives/base.py
# class BaseExtraGraphQLDirective(GraphQLDirective):
#     def __init__(self):
#         registry = get_global_registry()
#         super(BaseExtraGraphQLDirective, self).__init__(
#             name=self.get_name(),
#             description=self.__doc__,
#             args=self.get_args(),
#             locations=[
#                 DirectiveLocation.FIELD,
#                 DirectiveLocation.FRAGMENT_SPREAD,
#                 DirectiveLocation.INLINE_FRAGMENT,
#             ],
#         )
#         registry.register_directive(self.get_name(), self)
# 
#     @classmethod
#     def get_name(cls):
#         return to_snake_case(cls.__name__.replace("GraphQLDirective", ""))
# 
#     @staticmethod
#     def get_args():
#         return {}


# Path: graphene_django_extras/directives/list.py
import random
from graphql import GraphQLArgument, GraphQLNonNull, GraphQLInt
from .base import BaseExtraGraphQLDirective

# -*- coding: utf-8 -*-



__all__ = ("ShuffleGraphQLDirective", "SampleGraphQLDirective")


class ShuffleGraphQLDirective(BaseExtraGraphQLDirective):
    """
    Shuffle the list in place
    """

    @staticmethod
    def resolve(value, directive, root, info, **kwargs):
        if value:
            random.shuffle(value)

        return value



class SampleGraphQLDirective(BaseExtraGraphQLDirective):