code: def validate_root_vertex_directives(root_ast):
      
      directives_present_at_root = set()
      for directive_obj in root_ast.directives:
          directive_name = directive_obj.name.value
  
          if is_filter_with_outer_scope_vertex_field_operator(directive_obj):
              raise GraphQLCompilationError(u'Found a filter directive with an operator that is not'
                                            u'allowed on the root vertex: {}'.format(directive_obj))
  
          directives_present_at_root.add(directive_name)
  
      disallowed_directives = directives_present_at_root & VERTEX_DIRECTIVES_PROHIBITED_ON_ROOT
      if disallowed_directives:
          raise GraphQLCompilationError(u'Found prohibited directives on root vertex: '
                                        u'{}'.format(disallowed_directives))
docs: Validate the directives that appear at the root vertex field.