code: def _compile_graphql_generic(language, lowering_func, query_emitter_func,
                               schema, graphql_string, type_equivalence_hints, compiler_metadata):
      
      ir_and_metadata = graphql_to_ir(
          schema, graphql_string, type_equivalence_hints=type_equivalence_hints)
  
      lowered_ir_blocks = lowering_func(
          ir_and_metadata.ir_blocks, ir_and_metadata.query_metadata_table,
          type_equivalence_hints=type_equivalence_hints)
  
      query = query_emitter_func(lowered_ir_blocks, compiler_metadata)
  
      return CompilationResult(
          query=query,
          language=language,
          output_metadata=ir_and_metadata.output_metadata,
          input_metadata=ir_and_metadata.input_metadata)
docs: Compile the GraphQL input, lowering and emitting the query using the given functions.
  
      Args:
          language: string indicating the target language to compile to.
          lowering_func: Function to lower the compiler IR into a compatible form for the target
                         language backend.
          query_emitter_func: Function that emits a query in the target language from the lowered IR.
          schema: GraphQL schema object describing the schema of the graph to be queried.
          graphql_string: the GraphQL query to compile to the target language, as a string.
          type_equivalence_hints: optional dict of GraphQL interface or type -> GraphQL union.
          compiler_metadata: optional target specific metadata for usage by the query_emitter_func.
  
      Returns:
          a CompilationResult object