Absinthe.Adapter.StrictLanguageConventions (absinthe v1.6.0) View Source

Strict version of Absinthe.Adapter.LanguageConventions that will reject improperly formatted external names.

For example, this document:

{
  create_user(user_id: 2) {
    first_name
    last_name
  }
}

Would result in name-mismatch errors returned to the client.

The client should instead send the camelcase variant of the names:

{
  createUser(userId: 2) {
    firstName
    lastName
  }
}

See Absinthe.Adapter.LanguageConventions for more information.

Link to this section Summary

Functions

Converts a snake_case to camelCase

Converts a camelCase to snake_case

Link to this section Functions

Link to this function

to_external_name(internal_name, role)

View Source

Converts a snake_case to camelCase

See Absinthe.Adapter.LanguageConventions.to_external_name/2

Link to this function

to_internal_name(external_name, role)

View Source

Converts a camelCase to snake_case

Returns nil if the converted internal name does not match the converted external name.

See Absinthe.Adapter.LanguageConventions.to_internal_name/2