thecodingmachine / graphqlite-bundle

A Symfony bundle for thecodingmachine/graphqlite.
34 stars 36 forks source link

Sorting issue on schema generation command #170

Closed pkameisha closed 1 year ago

pkameisha commented 1 year ago

My team has faced annoying issue on command graphqlite:dump-schema.

The main point is that elements in schema are sorted in different ways on different machines, which leads to invalid test schema validation.

Example: on one machine we got next sorting:

type AccessPolicyPayload {
  accessPolicy: AccessPolicy!
}

type RolePayload {
  role: Role!
}

and on another one we got next sorting:

type RolePayload {
  role: Role!
}

type AccessPolicyPayload {
  accessPolicy: AccessPolicy!
}
nguyenk commented 1 year ago

Fixed by https://github.com/thecodingmachine/graphqlite-bundle/blame/master/Command/DumpSchemaCommand.php#L46C99-L46C99

Ty @aszenz