You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: find_many.rs
    path of file: ./repos/grafbase/engine/crates/engine/src/registry/resolvers/atlas_data_api/request/query
    
    the code of the file until where you have to start completion: use graphql_cursor::GraphqlCursor;
use indexmap::IndexMap;
use serde::Serialize;
use serde_json::Value;

use super::AtlasQuery;
use crate::{
    names::OUTPUT_EDGE_CURSOR,
    registry::{
        resolvers::{
            atlas_data_api::{
                cursor::AtlasCursor,
                input,
                pagination
    
    pub fn new(ctx: &ContextField<'_>, resolver_ctx: &ResolverContext<'_>) -> Result<Self, Error> {
        match (input::first(ctx), input::last(ctx)) {
            (Some(_), Some(_)) => {
                return Err(Error::new("first and last parameters can't be both defined"));
            }
            (None, None) => {
                return Err(Error::new(
                    "please limit your selection by setting either the first or last parameter",
                ));
            }
            _ => (),
        }

        let selection_target: SelectionSetTarget<'_> = resolver_ctx.ty.try_into().unwrap();

        let selection_type = selection_target
            .field("edges")
            .and_then(|field| ctx.registry().lookup(&field.ty).ok());

        let selection_field = selection_type.as_ref().and_then(|output| output.field("node"));
        let selection_type = selection_field.and_then(|field| ctx.registry().lookup(&field.ty).ok());
        let selection_field_types = selection_type.as_ref().and_then(OutputType::field_map).unwrap();

        let selection = ctx.look_ahead().field("edges").field("node").selection_fields();
        let projection = projection::project(ctx, selection.into_iter(), selection_field_types)?;
        let filter = input::filter(ctx)?;

        let order_by = input::order_by(ctx);
        let sort = input::sort(ctx, order_by.as_deref())?;

        let limit = input::first(ctx).or_else(|| input::last(ctx)).map(|limit| limit + 1);

        let metadata = Metadata { order_by };

        Ok(Self {
            filter,
            projection,
            sort,
            limit,
            metadata,
        })
    }