Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(parser): add inline graphql support #59

Merged
merged 1 commit into from
Jul 16, 2024
Merged

Conversation

gorillamoe
Copy link
Member

Enable inline graphql support.

This here should work now.. haven't tested mutations, yet, but they should also work..

with variables:

# @graphql 1
POST https://swapi-graphql.netlify.app/.netlify/functions/index HTTP/1.1
accept: application/json

query Person($id: ID) {
  person(personID: $id) {
    name
  }
}
variables { "id": 1 }

without variables:

# @graphql 1
POST https://swapi-graphql.netlify.app/.netlify/functions/index HTTP/1.1
accept: application/json

query Query {
  allFilms {
    films {
      title
      director
      releaseDate
      speciesConnection {
        species {
          name
          classification
          homeworld {
            name
          }
        }
      }
    }
  }
}

closes #58

@gorillamoe gorillamoe added the enhancement New feature or request label Jul 16, 2024
@gorillamoe gorillamoe self-assigned this Jul 16, 2024
@gorillamoe gorillamoe merged commit 12454e2 into main Jul 16, 2024
@gorillamoe gorillamoe deleted the feat/graphql-support branch July 16, 2024 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GraphQL Support
1 participant